Reputation: 1
Please help,
I want to use the value that i stored using storeText.
My problem is, how do i use this on the other fields of the page?
Thanks in advance!
For example:
I want to get the name of this customer, and verify it on another site if its existing by entering the name on the search field on another site?
Upvotes: 0
Views: 1981
Reputation: 734
Why don't you get the text from the webelement store it in a global static variable and call the variable in the other test case?
Upvotes: 0
Reputation: 38414
See the "Variable substitution" paragraph of the documentation, it even has a nice example of usage for storing a name from multiple fields:
Variable substitution
Variable substitution provides a simple way to include a previously stored variable in a command parameter. This is a simple mechanism, by which the variable to substitute is indicated by
${variableName}
. Multiple variables can be substituted, and intermixed with static text.Example:
store | Mr | title storeValue | nameField | surname store | ${title} ${surname} | fullname type | textElement | Full name is: ${fullname}
Upvotes: 3