Ask a Question

How to click onto an order number link when it changes on every run

Occasional Contributor

How to click onto an order number link when it changes on every run

My auto script creates an order

I then need to click into the order number at the end of the test to verify its contents on the record

The issue is, the order number changes on every test.  Such as 90333, 90334, etc.  No other values exist in front of or after the order number, so even using a wildcard such as * in place of the order number is not working.

Any other ideas on how I can successfully click into the order number?  I'm either getting object does not exist type errors or when using a wild card, I get unable to find the object.  I'm a visual learner, so any examples on how you resolved it via javascript is very helpful (or whichever language you have it working in).  Thx!


Hi @Jaime 


Using a set variable value operation should suffice here.


I create my order, somewhere in the UI we can grab that order ID and set a variable value temporarily. 


I can then reference that variable value to click into or I can change my validation check to assert against that set variable value.


Even better, when it comes to setting that value we have a bunch of operational parameters for your convenience, for example if the property value of that object is what is changing, say if it is a text property or a content text property then we can grab value and set the variable value in the iteration


Hope this helps  




Showing results for 
Search instead for 
Did you mean: