Quality Testing

Quality is delighting customers

How to enter the text without using sendkeys()?

Interview Question:

How to enter the text in a input field without using sendkeys()?

Views: 1181

Reply to This

Replies to This Discussion

Hi All,

Most of the automation testing company used below java script code snippet as an alternative when sendkeys is not working.

JavascriptExecutor jse = (JavascriptExecutor) driver;
jse.executeScript("document.getElementById('s').value='abc'");

Hopefully this will resolve your queries.

Thanks Anand!

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service