我想在Selenium IDE(Firefox)中使用命令“assertTextPresent”。我将其配置是这样的:Selenium IDE commnand assertTextPresent不工作
Command: assertTextPresent
Target: <th align="center" abbr="Monday" scope="col" style="background-color:#EFEDF5;font-weight:normal;">Mon</th><th align="center" abbr="Tuesday" (truncated for brevity)
Value: (left empty)
从我可以告诉,硒不匹配我的“目标”与渲染页面的,因为在它的HTML代码的源代码。所以它总是失败,即使它应该通过。我怎样才能做出这个断言的工作?
从Selenium ID 2.4开始,这将不再起作用。您正在使用assertTextPresent搜索的文本必须进入值字段而不是目标字段。此外,asserTextPresent已弃用,未来版本可能不支持。 –