Łukasz Siwiński
Łukasz Siwiński

Reputation: 330

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

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?

Upvotes: 1

Views: 4298

Answers (3)

Ankit jain
Ankit jain

Reputation: 4328

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

Upvotes: 4

Nikhil Surendran
Nikhil Surendran

Reputation: 1006

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...

Upvotes: 0

Łukasz Siwiński
Łukasz Siwiński

Reputation: 330

From Selenium IDE use this:

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

Upvotes: 1

Related Questions