I have tried using both setText() and sendKeys() to enter text into the textbox like:
return driver.elementById(this.mobileNumberTextBox)
.click()
.setText(mobile);
But I have noticed that about 3 out of 10 cases are failing randomly because of sendKeys()/setText().It also takes a long time for this one command to execute which is slowing down the entire test execution cycle.Sometimes randomly the keyboard opens and keypress is executed along with the supplied string.
How can I solve this issue?Is there any other method of entering text in the texbox.A solution in javascript format will be very much appreciated.