What is an alternative for sendKeys Method in WebDriver?
I also got stammered on this and thought in mind
Why the hell do we need this?
There are below possible reason that I could find, When we need any alternative to sendKeys.
- When the Text element is disabled or locked, sendKeys can not set the value in text field.
(in my opinion, this is not the correct way of Automation, because the element is locked or disabled by intend to not allow any text insertion)
- When we want to write huge text as input… that time the way WebDriver work, by sending Series of characters from String one by one, and Which is Very time consuming. so to minimize that time we can use this alternate method
So now we have above two problems with sendKeys ……
Way 1 to Execute Script
lets look at another approach.