Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

Both are used to get the WebElement value in between tags? Kindly update whether my assumption is right. If wrong please elaborate it.

1 Answer

0 votes
by (62.9k points)

 <input attr1='a' attr2='b' attr3='c'>foo</input>

getAttribute(attr1) you get 'a'

getAttribute(attr2) you get 'b'

getAttribute(attr3) you get 'c'

getText() with no parameter you can only get 'foo'

I hope you understand it and it's helpful to you!

Browse Categories

...