我们可以使用" Store" 命令在一个测试用例中声明一个变量,并在同一个测试套件的另一个测试用例中全局使用。
我的问题是我们如何在Selenium IDE中全局使用变量?
答案 0 :(得分:1)
我找到了一些可以帮助你的文章: -
http://qafriend.com/selenium/storage-or-global-variable-in-selenium
https://willcodefor.wordpress.com/2013/05/07/creating-global-variables-in-selenium-ide/
希望它能帮到你
答案 1 :(得分:1)
答案是肯定的
您可以在一个测试用例中使用store
命令,并在另一个测试中使用其值
格式是
Command : store
Target : 9999999999
Value : username
这就是你可以访问它的方式:
${username}
示例:假设我必须在某个测试用例中执行登录,所以在这里我将使用store
将用户名和密码存储在一个测试用例中,并且每当我需要时,我将按以下方式使用:
Command : type
Target : id=MobileNo
Value : ${username}