如何在Selenium IDE中比较两个存储的文本?

Sta*_*mov 2 selenium selenium-ide

如何比较两个存储的文本,如果它们等于echo某些结果呢?

Tet*_*ity 6

您可以使用该verifyEval命令比较两个变量:

store | text | i
store | different text | j
verifyEval | storedVars['i']==storedVars['j'] | true
Run Code Online (Sandbox Code Playgroud)

以书面形式运行此脚本将导致测试失败[error] Actual value 'false' did not match 'true'.更改jtext,它会完全没有错误.

请注意,通过在命令中更改true为,这也可用于验证两个字符串不相等.falseverifyEval