Element not interactable in Chrome Headless

Hello, everyone.

I am having trouble with this error message:

com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/App/Shared/a_TUTORIALS_Nav’ (Root cause: org.openqa.selenium.ElementNotVisibleException: element not interactable

Testing on this website http://dev.zoomadmin.com
Here is my code:

Code

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
import com.kms.katalon.core.testobject.RequestObject as RequestObject
import com.kms.katalon.core.testobject.ResponseObject as ResponseObject
import groovy.json.JsonSlurper as JsonSlurper
import com.kms.katalon.core.exception.StepFailedException as StepFailedException
import za.ZaCommon as ZaCommon

def url = ZaCommon.getBaseWebsiteEnvironmentUrl()

// Step 1.
WebUI.openBrowser(url)

// Step 1. Verify 1.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/img_Logo’), 0)

// Step 1. Verify 2.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_BLOG_Nav’), 0)

// Step 1. Verify 3.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_TUTORIALS_Nav’), 0)

// Step 1. Verify 4.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_CONTACT_Nav’), 0)

// Step 1. Verify 5.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_Subscribe_Nav’), 0)

// Step 1. Verify 6.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/h1_Server Hosting Control Panel’), 0)

// Step 1. Verify 7.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/h4_Manage Your Servers Web’), 0)

// Step 1. Verify 8.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/strong_Built with’), 0)

// Step 1. Verify 9.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/a_Blog’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/HomePage/a_Tutorials’), 0)

// Step 1. Verify 10.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/div_SubscribeBox’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/h5_Coming Soon…’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/input_name’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/input_email’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/div_Stay Updated On Our Progress’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/button_Subscribe’), 0)

// Step 2.
WebUI.delay(5)
WebUI.click(findTestObject(‘Object Repository/App/Shared/a_TUTORIALS_Nav’))

// Step 2. Verify 1.
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_How To Install Ubuntu Packages’), 0)
WebUI.verifyElementPresent(findTestObject(‘Object Repository/App/Shared/a_Example Commands For Linux’), 0)

All steps and verifications pass, except click command in step 2 (including verifyElementPresent for that element). I have tried to delete and recreate that element, also this test passes on Chrome (even with args:[…,“headless”]), but fails on headless Chrome.
Full message:

Full message

com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/App/Shared/a_TUTORIALS_Nav’ (Root cause: org.openqa.selenium.ElementNotVisibleException: element not interactable
(Session info: headless chrome=72.0.3626.109)
(Driver info: chromedriver=2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a),platform=Windows NT 10.0.17763 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: ‘TIGRANSARGSYAN’, ip: ‘10.10.10.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.43.600210 (68dcf5eebde371…, userDataDir: C:\Users\sargt\AppData\Loca…}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:50626}, 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: 72.0.3626.109, webStorageEnabled: true}
Session ID: 5a6740abbd0c1b4bad3ea2d05c005852)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$1.call(Unknown Source)
at 01 - Test_HomePage_Elements_Visibility.run(01 - Test_HomePage_Elements_Visibility:96)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1550665434030.run(TempTestCase1550665434030.groovy:22)

2 Likes

HI there,

Did you find the solution for this error? I’m also facing the same issue now. If you have a solution for this could you please share it. Thanks.

Hi Guys,
Have you been able to identify / resolve the issue?
I am having similar problems. Test runs successfully in both firefox and chrome, but fails in firefox (headless) and Chrome (headless).

Version Info:
Katalon Studio Enterprise 7.4.0 Build 1
Firefox 75.0 (64-bit)
Chrome Version 81.0.4044.129 (Official Build) (64-bit)
Updated all webdrivers from within Katalon

Error message:

ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Unable to set text ‘in:activity timeFrame:“7 Days”’ of object ‘Object Repository/AQL/AQL_input’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to set text ‘in:activity timeFrame:“7 Days”’ of object ‘Object Repository/AQL/AQL_input’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.setText(SetTextKeyword.groovy:66)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:72)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:976)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$setText$0.call(Unknown Source)
at C90433 - Default Columns - Title.run(C90433 - Default Columns - Title:20)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1588741256441.run(TempTestSuite1588741256441.groovy:37)
Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable
(Session info: headless chrome=81.0.4044.138)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’

The Object the test is failing to set text to is defined as follows:

Tried with the testing-id locator as well as using straight XPATH

Thanks!

1 Like

Having same problem with Katalon 7.4.0 and 7.3.0

here the link of my problem:

If you fix it, can you share how you did it? Thanks.

2 Likes

You should try