Unable to set text - element not interactable

Hi, I have a very big problem. I couldn’t automate this section (see on the screen). I couldn’t set my text on this filed. On the console, I see that “Unable to set text” and element not interactable. Please help.

Make sure the the element is visible before you to set its value:

WebUI.waitForElementVisible(findTestObject("whatever"), 10)
WebUI.setText(findTestObject("whatever"), "mateus")

It is usually a good idea to do ALL your waits before you try to modify any of your fields:

// Do all the waits first...
WebUI.waitForElementVisible(findTestObject("object1"), 10)
WebUI.waitForElementVisible(findTestObject("object2"), 10)
WebUI.waitForElementVisible(findTestObject("object3"), 10)

//Set values...
WebUI.setText(findTestObject("object1"), "russ")
WebUI.setText(findTestObject("object2"), "mateus")
WebUI.setText(findTestObject("object3"), "katalon")

When I created these steps:

Blockquote
WebUI.click(findTestObject(‘Search/Page_Gitara - Instrumenty - OLXpl/Cena_od_filed’))
WebUI.waitForElementVisible(findTestObject(‘Search/Page_Gitara - Instrumenty - OLXpl/Cena_od_filed’), 10)
WebUI.setText(findTestObject(‘Search/Page_Gitara - Instrumenty - OLXpl/Cena_od_filed’), ‘1500’)

I have an error that

Blockquote
invalid element state: Element must be user-editable in order to clear it.

You have them backwards. Reread my post.

I’ve created a script that I am waiting for each object from the list, next I try to set my value without the list, but I still have the same error. I don’t know why is this problem. I’ve tried creating the same case on the different tool and it passed. Zero problems, only on Katalon this case don’t work.

Hi @mat2224v2

Is the element you’re trying to set text a Select element ? It looks like you can only choose within a predefined range of values ? Can you try keyword WebUI. selectOptionByValue ?

If that is not the case, then please give us the relevant HTML around that element and the locator you’re using so that we can makes sure that there is not another element on the page selected by the locator which is not user-editable. Someone on StackOverflow had the same error message and it turned out that was the case:

Another solution is to set text via javascript, which reportedly worked to solve this problem, if you’re confident the locator is definitely correct.

1 Like

Ok, I tried using this lines of code and my test case passed, but I still don’t see my value in this field.

Hi @mat2224v2

As mentioned, you’d need to give us the html of the relevant element, otherwise it’s very difficult to know.

My piece of code with this field “Cena od” on the screen:

And if you want to look this on the real example I paste link to the URL site:

Blockquote
Gitara - Instrumenty w Poznań - OLX.pl