Showing posts with label getAttribute. Show all posts
Showing posts with label getAttribute. Show all posts

December 2, 2021

Selenium Interview Questions on Textbox Part -2

December 02, 2021 21
Selenium Interview Questions on Textbox

1. How to get text in textbox?
2. How to get attributes like size, placeholder of text box?
We have to use getAttribute command to get attrubte values of textbox.
driver.findElement(locator).getAttribute("value"); -- for text in textbox 
driver.findElement(locator).getAttribute("attributeName"); -- For any attribute