Selenium IDE-如何获得verifyNotText的结果并执行正确的操作
我使用的是SeleniumIDE,我只需要使用这个工具。 我有这样一个场景:我检查我的邮箱是否包含邮件。 唯一的方法是检查页面上是否有特定的字符串 我已经应用了这个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
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