Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Selenium IDE-如何获得verifyNotText的结果并执行正确的操作_Selenium_Ide_Command - Fatal编程技术网

Selenium IDE-如何获得verifyNotText的结果并执行正确的操作

Selenium IDE-如何获得verifyNotText的结果并执行正确的操作,selenium,ide,command,Selenium,Ide,Command,我使用的是SeleniumIDE,我只需要使用这个工具。 我有这样一个场景:我检查我的邮箱是否包含邮件。 唯一的方法是检查页面上是否有特定的字符串 我已经应用了这个 Command: verifyNotText Target: //form[@id='messages']/table/tbody/tr/td[5] Value: "on behalf of:.*" 如何检查此命令的结果? 我的意思是:如果结果为真,测试将继续执行命令列表, 相反,它应该执行其他命令 我在考虑使用类似于: Comm

我使用的是SeleniumIDE,我只需要使用这个工具。 我有这样一个场景:我检查我的邮箱是否包含邮件。 唯一的方法是检查页面上是否有特定的字符串

我已经应用了这个

Command: verifyNotText
Target: //form[@id='messages']/table/tbody/tr/td[5]
Value: "on behalf of:.*"
如何检查此命令的结果? 我的意思是:如果结果为真,测试将继续执行命令列表, 相反,它应该执行其他命令

我在考虑使用类似于:

Command: gotoif 
Target:  previous command
Value:   goAhead
你有什么建议吗

提前谢谢你!
C

尝试使用
storeTextPresent
。如果要使用
gotoIf
函数,则需要一个变量

storeTextPresent on behalf of:.* text //text is a variable name
gotoIf ${text}==on behalf of:.* Yes //Yes and No are labels
gotoIf ${text}!=on behalf of:.* No
label Yes 
//instructions if text present equals "on behalf of:.*"
goto End
label No
//instructions if text present not equals "on behalf of:.*"
另一个有用的方法是使用
goto
函数。如果您想跳转到特定步骤,可以使用此函数“驱动”测试。 例如:

希望有帮助!
如果有什么不清楚的地方,请留下评论

谢谢拉法,这正是我需要的:)
goto End //jump to label End
label End