问题
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