Element is not currently interactable and may not be manipulated

Hi,

I’ve got an error when running on the Katalon Studio.

05-04-2018 09:56:00 AM - [FAILED] - Unable to set text ‘1’ of object ‘Object Repository/Manufacturer Preference/input_HeaderLine’ (Root cause: org.openqa.selenium.InvalidElementStateException: invalid element state: Element is not currently interactable and may not be manipulated

(Session info: chrome=66.0.3359.139)

(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 0 milliseconds

Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’

System info: host: ‘GBS-N-CG43425ZF’, ip: ‘10.65.2.33’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_102’

Driver info: com.kms.katalon.selenium.driver.CChromeDriver

Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528161 (5b82f2d2aae0ca…, userDataDir: C:\Users\GBSJAC~1.LIN\AppDa…}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 66.0.3359.139, webStorageEnabled: true}

Session ID: a599e70b08a6a47b8342dbb8bdb6df32)

05-04-2018 09:56:00 AM - [FAILED] - Test Cases/Create Preference FAILED because (of) Unable to set text ‘1’ of object ‘Object Repository/Manufacturer Preference/input_HeaderLine’ (Root cause: org.openqa.selenium.InvalidElementStateException: invalid element state: Element is not currently interactable and may not be manipulated

(Session info: chrome=66.0.3359.139)

(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)

The scenario is as follows:

→ The radio button “With Header” is selected by default. Upon selecting this, I want to enter values in “Header Line/Row No.” and “Data Line/Row No.” as these are mandatory fields. I used the function “Check” for the radio button “With Header” and “Set Text” for the “Header Line/Row No.”. I run the Katalon Studio and got the above error. Please advise. Thanks.

Radio Button.JPG

I think your object identifier is wrong, try using xpath for identify the field

I try to use the xpath but it doesn’t work too.

Hi Jacqueline

The problem appears to be the text inputs, not the radios. Your devtools image doesn’t show them.

After clicking the radio, try a small wait and see if it works. It might be that it’s tried to edit the input box too quick, before it’s actually rendered on the screen

Tom Longhurst said:

After clicking the radio, try a small wait and see if it works. It might be that it’s tried to edit the input box too quick, before it’s actually rendered on the screen

After trying this, it still doesn’t work. FYI, the radio button is selected by default.

Russ Thomas said:

Hi Jacqueline

The problem appears to be the text inputs, not the radios. Your devtools image doesn’t show them.

Hi Russ,

I tried these 2 types: “Set Text” and “Send Keys” for the input.

1. Click radio button
2. Delay 3 seconds
3. Wait for Element Visible
4. Set Text

Error Message: Element is not currently interactable and may not be manipulated

If I change step 4 to “Send Keys”, the error message will be “element not visible”.

I had the “not currently interactable” error before, when I needed to fill two different combo boxes on the same web form. You can try some of the following:
- click the element before sending text to it
- try WebUI.refresh() before sending text
- try WebUI.waitForPageLoad or similar
- the point is: try doing something (clicking or focusing) before interacting with the element

Mate Mrse said:

I had the “not currently interactable” error before, when I needed to fill two different combo boxes on the same web form. You can try some of the following:
- click the element before sending text to it
- try WebUI.refresh() before sending text
- try WebUI.waitForPageLoad or similar
- the point is: try doing something (clicking or focusing) before interacting with the element

Hi Mate,

I tried to click or focus before sending text and it gives the error “element not visible”.

1 Like

All the other methods did not work for me. All the waits.

Here is what worked:

Add this line to the script, Just before the element that shows the error.

WebUI.delay(3)

I fiddled with this a bit and discovered more often than not, the issue was the location strategy needed to be improved; perhaps the element shares the same class as another. Hope this helps someone along the way.

I am facing the same issue and no any above solution is working . Any other suggestions? Thanks!

As mentioned by Russ before, the text inputs have problems. So I use javascript to change the display of the text input and send value to it. Example of the scripts as below:

WebUI.executeJavaScript(‘document.getElementById(‘HeaderLine’).setAttribute(‘style’,‘display: block’)’, null)

WebUI.click(findTestObject(‘Manufacturer Preference/input_HeaderLine’))

WebUI.executeJavaScript(‘document.getElementById(‘HeaderLine’).value = ‘1’;’, null)

Hope it helps! :slight_smile:

2 Likes