Both are used to get the WebElement value in between tags.
Is my assumption right? If wrong, please elaborate.
<input attr1='a' attr2='b' attr3='c'>foo</input>
getAttribute(attr1) you get 'a'
getAttribute(attr1)
getAttribute(attr2) you get 'b'
getAttribute(attr2)
getAttribute(attr3) you get 'c'
getAttribute(attr3)
getText() with no parameter you can only get 'foo'
getText()
1.4m articles
1.4m replys
5 comments
56.9k users