Hello,
I have a text area which displays the status of a currently running job, the text keeps changing depending on which stage the job is. How can i validate the text.textvalue when it changes dynamically.
All these values are stored in a json file and i will probably read the jason and validate on each different status message that it displays in the text area.
This is the rxPath of the control
/form[@title='ProgressControlWindow']/container[1]/?/?/text[@caption='End']
Please see the attached snapshot
Thanks,
Rekha
How to validate on a dynamically changing text in the text
How to validate on a dynamically changing text in the text
You do not have the required permissions to view the files attached to this post.
Re: How to validate on a dynamically changing text in the text
There are a few ways you can do this depending on your test case. You could always change your path to contain a variable and then populate that variable either through code or a data source:
/form[@title='ProgressControlWindow']/container[1]/?/?/text[@caption=$myVar]
$myVar would contain the value that you are looking for at that stage of your test. This way you can reuse the same path and just change the variable throughout test execution
source: https://www.ranorex.com/help/latest/ran ... athExample
You could also do this in user code with a switch statement or something similar which can test against all acceptable values. Basically, have a method which takes the text as a parameter and check it against your expected values.
/form[@title='ProgressControlWindow']/container[1]/?/?/text[@caption=$myVar]
$myVar would contain the value that you are looking for at that stage of your test. This way you can reuse the same path and just change the variable throughout test execution
source: https://www.ranorex.com/help/latest/ran ... athExample
You could also do this in user code with a switch statement or something similar which can test against all acceptable values. Basically, have a method which takes the text as a parameter and check it against your expected values.