cancel
Showing results for 
Search instead for 
Did you mean: 

Very Simple Variable Assignment

SOLVED
MarkSchofer
Contributor

Very Simple Variable Assignment

MarkSchofer_0-1622747569661.png

This seems so straight forward especially when being done programmatically
In a keyword test
I read a value from a spread sheet -works fine
Create a project (tried script) variable 
The value appears as a last operation result. (176060)

Logs last operation result (176060)
Set Variable value = last operation result
The value does not say in the variable.   

1 ACCEPTED SOLUTION

Accepted Solutions
Marsha_R
Community Hero

Re: Very Simple Variable Assignment

That's the way it's supposed to work.  You have to assign LastResult to your variable immediately after it's created.

https://support.smartbear.com/testcomplete/docs/keyword-testing/basic/result.html

View solution in original post

4 REPLIES 4
MarkSchofer
Contributor

Re: Very Simple Variable Assignment

I switched around the order of operations. Programmatically it doesn't make sense. But it does seem to work.



Have a great day

Marsha_R
Community Hero

Re: Very Simple Variable Assignment

That's the way it's supposed to work.  You have to assign LastResult to your variable immediately after it's created.

https://support.smartbear.com/testcomplete/docs/keyword-testing/basic/result.html

View solution in original post

MarkSchofer
Contributor

Re: Very Simple Variable Assignment

It is essentially what I did -yes there is a log step in there (I do that during development).   
Thanks for the response. It is now working

Marsha_R
Community Hero

Re: Very Simple Variable Assignment

(I leave the log steps in even after development.  If I haven't looked at a test in months, it will seem rather foreign and it's nice to have the extra information in there.)

New Here?
Join us and watch the welcome video:
Announcements