cancel
Showing results for 
Search instead for 
Did you mean: 

How to store a value that is generated in a transaction in test complete

Frequent Contributor

Re: How to store a value that is generated in a transaction in test complete

Hope this will help to resolve the issue.

Community Hero

Re: How to store a value that is generated in a transaction in test complete

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.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Frequent Contributor

Re: How to store a value that is generated in a transaction in test complete

Added a delay after Yes but the value is not stored in the variable.

Highlighted
Community Hero

Re: How to store a value that is generated in a transaction in test complete

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?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Frequent Contributor

Re: How to store a value that is generated in a transaction in test complete

I need that global variable value to be used to select the Work Order ID in the next steps in same keyword test.

Community Hero

Re: How to store a value that is generated in a transaction in test complete

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?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Frequent Contributor

Re: How to store a value that is generated in a transaction in test complete

Value does not get stored

Community Hero

Re: How to store a value that is generated in a transaction in test complete

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.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Frequent Contributor

Re: How to store a value that is generated in a transaction in test complete

Attaching the screenshots.

In Capture 7 screenshot I do not know what to use? What Method or property to use?

Community Hero

Re: How to store a value that is generated in a transaction in test complete

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.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors