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: 66

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.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2017   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service