Reputation: 55
can we declare a variable in one test case using "Store" command and use globally in another test case of the same test suite.
My Question is how can we use variable globally in Selenium IDE ?
Upvotes: 1
Views: 613
Reputation: 7708
Answer is Yes
You can use store
command in one test case and use its value in another test
Format is
Command : store
Target : 9999999999
Value : username
And This is how you can access it:
${username}
Example : suppose i have to perform login in some testcase so here i will store username and password at one testcase using store
and whenever i required i will use in following manner :
Command : type
Target : id=MobileNo
Value : ${username}
Upvotes: 1
Reputation: 17553
I have found some articles which help you for the same :-
http://qafriend.com/selenium/storage-or-global-variable-in-selenium
https://willcodefor.wordpress.com/2013/05/07/creating-global-variables-in-selenium-ide/
Hope it will help you
Upvotes: 1