How to verify that my link title attribute has specified value?

做~自己de王妃 提交于 2019-12-11 10:42:55

问题


I have a link somewhere on my page, let say like this

<a href="http://example.com" title="my title message">my link label</a>

How to verify, that my link title attribute has 'my title message' value?


回答1:


Assertattribute command use to verify it, please check this code.

assertattribute  | title = my title message@href | http://example.com
assertattribute  | link=my link label@href       | http://example.com



回答2:


From Selenium IDE use this:

command         | target                   | value
-------------------------------------------------------------
assertAttribute | link=my link label@title | my title message



回答3:


try like this.

command: verifyTitle

target: my title message

this command will compare the actual page title with the text given in the command target if both is same no error will show other wise error will display

Thank You...



来源:https://stackoverflow.com/questions/15093639/how-to-verify-that-my-link-title-attribute-has-specified-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!