December 2, 2021

Selenium Interview Questions on Textbox Part -2

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





18 comments:

  1. <a href="https://etaleya.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%aa%d8%b3%d9%84%d9%8a%d9%83-%d9%85%d8%ac%d8%a7%d8%b1%d9%8

    ReplyDelete