OK, everything seems to be in order there... next question, when you put a break point on that line, does the object property that you're looking for actually have a value?
Also, this may be a timing issue. You click the "Yes" button just before this. If there is some sort of delay, like the web page needs to process or something, it could be that the value assignment is being made BEFORE the property actually populates with a value. As a debug trial, put a "Delay" call just before the Set Variable to wait something like 5 seconds to see if that resolves the problem.
Added a delay after Yes but the value is not stored in the variable.
Just out of curiousity, how are you determining whether or not the value is stored in the variable? Are you referencing the variable somewhere else and it's coming up blank?
Also... did you try debugging and making sure that the property you're referencing in the "Set Variable" statement actually contains the desired value?
I need that global variable value to be used to select the Work Order ID in the next steps in same keyword test.
So, I'm assuming you know it doesn't work because the next step doesn't have any information.
Then.... we're back to making sure the property actually has the desired value. Can you give a screenshot from Object Spy showing the property and the desired value?
Value does not get stored
Yes, we've established that... you're trying to capture the value of a particular property of an object and it's not getting stored. What I would like to do is debug that... using Object Spy in TestComplete, can you view the object and it's properties and make sure that, yes, in fact, the property contains the desired value? Not the variable, but the ACTUAL object property in your application under test.
That's not object spy....
https://support.smartbear.com/testcomplete/docs/testing-with/exploring-apps/object-spy/about.html
Use this tool to examine the object in question... this will display all the properties.... and one of those properties should contain the value you're looking for.
Subject | Author | Latest Post |
---|---|---|