Reputation: 548
I am trying to run test cases to perform reset password and I am facing this issue.
WebDriverException Element must be user-editable in order to clear it.
Basically i am accessing the page for entering the new password and doing this:
browser.$("#newPassword").text("password");
where execution of the above line throws the error.
Upvotes: 10
Views: 42702
Reputation: 3256
It might be a case of using the wrong method for the input type.
In CodeCeption at least, fillField
should be used on input elements and selectOption
should be used on select elements and mixing them up will give invalid element state: Element must be user-editable in order to clear it.
Upvotes: 1
Reputation: 8663
I had this problem with a Primefaces autoComplete element. Primefaces 6.0 renders a span with the ID you pass, and within that an input with a "_input" appended to the ID. If you just use the ID you added in your source code, you tell Selenium to enter into the span (which fails with the "element must be user-editable" error). Add the "_input" to the ID if you select by ID in selenium.
Upvotes: 0
Reputation: 21
We can try the following:
WebElement.sendKeys(Keys.DELETE);
WebElement.sendKeys("Test");
Upvotes: 2
Reputation: 2381
I had the same problem and it was because there was another element with the same id which was not an input field so it could not be cleared.
Upvotes: 33