Experience & exploration about software QA tools & techniques. Maintaining & writing blog posts on qavalidation.com! Publishing video tutorials on youtube.com/qavbox

Assert the text entered in textbox using selenium – getText() vs getAttribute(“value”)

Many automation QAs confuse with which selenium method we need to use to fetch the textbox value from the web application. The short answer is getAttribute(“value”) Let’s consider qavbox.github.io/demo/signup The username text box with id=username Output – qavbox getAttribute(“value”) is used to fetch the value present in side element’s value attribute if any, also used…