Troubleshoot common exceptions when executing web tests

Thanks @Russ_Thomas for your input, we will fix this soon.

When I am trying to set an input value it is showing “invalid element state” and and for click event it is showing “Unable to click on element” errors even after adding Delay of 3 mins.
Please could you suggest any other solution?

You can try one of the following solutions to resolve the issue:

Correct the element’s XPath locator. Here is how to identify XPath:
Open your page using Chrome.
Right-click on your desired test object and choose Inspect
In the Elements tab of DevTools, right-click on your target object and select Copy > Copy XPath.
Open your test object in Katalon Studio, update XPath property with the copied value.

Still facing this issue, I tried updating the chrome web browser. Spinner always get stuck and doesn’t move to the element in the page, which it’s supposed to click. Is this being fixed?

java.lang.ExceptionInInitializerError

2 posts were split to a new topic: Element could be scrolled into view

org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.

I am unable to test in Safari or Edge Chromium. Both are installed on my machine. Both fail to initiate a session with the open browser command.

I have updated web drivers. Safari doesn’t appear on the list of browsers I can update drivers for.

I’m having the same issue for Edge and Internet Explorer 11. Installed Edge after installing Katalon, so I’m wondering if there’s a way to specify the path to the browser so that it starts correctly.

Caused by: groovy.lang.MissingMethodException: No signature of method: org.apache.poi.xssf.usermodel.XSSFCell.setCellType() is applicable for argument types: (org.apache.poi.xssf.usermodel.XSSFCell) values: []

import org.apache.poi.xssf.usermodel.XSSFCell;

public class TestWriteExcel {

@Keyword
public void demoWriteExcel (String strTest) throws IOException{

  //String path = RunConfiguration.getProjectDir()
  //FileInputStream fis = new FileInputStream(path+'\\TestData\\TestDetails.xlsx')
  FileInputStream fis = new FileInputStream("C:\\Users\\pasthana\\OneDrive - WellDyneRX\\personal_drive\\StateTypeRules_ClientFMC_SingleState.xlsx");
  XSSFWorkbook workbook = new XSSFWorkbook(fis);
  XSSFSheet sheet = workbook.getSheet("Sheet1");
  int rowCount = sheet.getLastRowNum()-sheet.getFirstRowNum();
  Row row = sheet.createRow(rowCount+1);
  Cell cell = row.createCell(0);
  cell.setCellType(cell);
  cell.setCellValue(strTest);
  //FileOutputStream fos = new FileOutputStream(path+'\\TestData\\TestDetails.xlsx')
  FileOutputStream fos = new FileOutputStream("C:\\Users\\pasthana\\OneDrive - WellDyneRX\\personal_drive\\RoutingAdminUI\\StateTypeRules_ClientFMC_SingleState.xlsx")
  workbook.write(fos);
  fos.close();

}

@pasthana You have the wrong data type in the parameter. It is supposed to be an int. Use one of the reserved types, like below:

cell.setCellType(cell.CELL_TYPE_STRING);

Here are the other offerings of the reserved cell type:

image

Hi. I have and currently using Sauce Labs for test with other tools. When tried using with Katalon Studio 7, I’m getting "Unable to parse remote response: Misconfigured – Sauce Labs Authentication Error.

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshoot-common-execution-exceptions-web-test.html
I’ve left a message here as well

04-28-2021 12:24:09 AM Test Cases/…

Elapsed time: 6.026s

Test Cases/… FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ‘’…

Any insight is appreciated. Thanks,
Tien

stale element reference: element is not attached to the page document
I have this error

Dear Katalon Team,

I am new to this wonderful community.

I have a web UI test cases which is failing when a Google authentication window (in Thai language) appears on the Chrome browser

When I am clicking the button after entering my username, I am getting the exception -

Caused by: org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element

is not clickable at point (517, 408). Other element would receive the click:

It is just a simple click of a button whose label is in THAI.

Please help !

hi all ’ i’m junior in Katalon and start record test case and then run it after change values but i get an error with drop down list i want to resolve it
=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document
At object: ‘Object Repository/Page_/select_---- ( ) - ( ) ( 9 )_804cd0’

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html

12-06-2021 04:22:48 م selectOptionByValue(findTestObject(“Object Repository/Page_/select_---- ( ) - ( ) ( 9 )_804cd0”), “1”, true)

Elapsed time: 1.762s

Unable to select option by value ‘1’ of object ‘Object Repository/Page_/select_---- ( ) - ( ) ( 9 )804cd0’ using regular expression (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to select option by value ‘1’ of object 'Object Repository/Page/select_---- ( ) - ( ) ( 9 )_804cd0’ using regular expression
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.SelectOptionByValueKeyword.selectOptionByValue(SelectOptionByValueKeyword.groovy:99)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword.execute(SelectOptionByValueKeyword.groovy:71)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.selectOptionByValue(WebUiBuiltInKeywords.groovy:1168)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$selectOptionByValue$4.call(Unknown Source)
at 2 - Add Contract type 1.run(2 - Add Contract type 1:36)
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:442)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:433)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:412)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:404)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:281)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:138)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:129)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1638800528872.run(TempTestCase1638800528872.groovy:25)
Caused by: org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document
(Session info: chrome=96.0.4664.45)
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘LPCAIQ0355’, ip: ‘10.10.10.9’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_282’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 96.0.4664.45, chrome: {chromedriverVersion: 95.0.4638.17 (a9d0719444d4b…, userDataDir: C:\Users\heid\AppData\Local…}, goog:chromeOptions: {debuggerAddress: localhost:18732}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 330dfceb0d23fffd22c0caee25212be9
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at com.kms.katalon.selenium.driver.CChromeDriver.execute(CChromeDriver.java:19)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
at org.openqa.selenium.remote.RemoteWebElement.getAttribute(RemoteWebElement.java:134)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
at com.sun.proxy.$Proxy11.getAttribute(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.getAttribute(EventFiringWebDriver.java:447)
at com.kms.katalon.core.webui.common.WebUiCommonHelper.selectOrDeselectOptionsByValueByRegularExpression(WebUiCommonHelper.java:279)
at com.kms.katalon.core.webui.common.WebUiCommonHelper.selectOrDeselectOptionsByValue(WebUiCommonHelper.java:263)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword$_selectOptionByValue_closure1.doCall(SelectOptionByValueKeyword.groovy:88)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword$_selectOptionByValue_closure1.call(SelectOptionByValueKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword.selectOptionByValue(SelectOptionByValueKeyword.groovy:99)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword.execute(SelectOptionByValueKeyword.groovy:71)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.selectOptionByValue(WebUiBuiltInKeywords.groovy:1168)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$selectOptionByValue$4.call(Unknown Source)
at Script1638799643880.run(Script1638799643880.groovy:36)
… 11 more
)

Greetings,

While demoing Katalon studio I encountered an error not listed on this page while running a test I had just recorded:

Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable

The element should be interactable

The element may have been “hidden” when you asked for it, or was not on the page yet, or it may have been covered by a pop-up, or…
The error message usually gives some indication of which of the above reason gives the cause.

I increased the action time to 2s, and it appears as though the page is fully loaded at the time of the error. There are no pop ups. This is the full output from the test failure, I’m not seeing an error beyond ElementNotInteractableException That exception isn’t listed on this page which is also why I’m posting here.

=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable
At object: 'Object Repository/Page_daz31f/button_SSD__controlPanel controlPanelOpen s_1cd1f0 (1)'

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================

12-22-2021 04:15:23 PM Test Cases/test_testCase

Elapsed time: 21.592s

Test Cases/test_testCase FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to click on object 'Object Repository/Page_daz31f/button_SSD__controlPanel controlPanelOpen s_1cd1f0 (1)'
	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.ClickKeyword.click(ClickKeyword.groovy:74)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:40)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:620)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$4.call(Unknown Source)
	at test_testCase.run(test_testCase:30)
	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:442)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:433)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:412)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:404)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:281)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:138)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:129)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1640218521332.run(TempTestCase1640218521332.groovy:25)
Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable
  (Session info: chrome=96.0.4664.110)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'C02L52PSFFT1', ip: '2600:1700:dea0:2f90:e91f:ada3:7ee2:2773%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.7', java.version: '1.8.0_275'
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 96.0.4664.110, chrome: {chromedriverVersion: 95.0.4638.17 (a9d0719444d4b..., userDataDir: /var/folders/7t/y7ql0qv96jq...}, goog:chromeOptions: {debuggerAddress: localhost:63151}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 8c1dd87ff2bc3e7bbbaed97fa0d03ee8
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
	at com.kms.katalon.selenium.driver.CChromeDriver.execute(CChromeDriver.java:19)
	at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
	at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
	at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
	at com.sun.proxy.$Proxy11.click(Unknown Source)
	at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:417)
	at org.openqa.selenium.WebElement$click.call(Unknown Source)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.clickUntilSuccessWithTimeout(ClickKeyword.groovy:81)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.clickUntilSuccessWithTimeout(ClickKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:67)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.call(ClickKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	... 17 more

You’re right. I don’t see the reason for your error in the message. How about adding some wait statements before you click?

WebUI.waitForPageLoad(10)
WebUI.waitForElementVisible(findTestObject('Page_daz31f/button_SSD__controlPanel controlPanelOpen s_1cd1f0 (1)'), 10)

WebUI.click(findTestObject('Page_daz31f/button_SSD__controlPanel controlPanelOpen s_1cd1f0 (1)'))

Back from the holidays. Running the test after inserting Wait For Page Load 10s and Wait For Element Visible created the following result. I’m reading this as if the object is taking a long time to become visible. Which is odd because it is immediately interactable in real time

=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable
At object: 'Object Repository/Page_daz31f/button_SSD__controlPanel controlPanelOpen s_1cd1f0 (1)'

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================

01-06-2022 01:32:17 PM click(findTestObject("Page_daz31f/button_SSD__controlPanel controlPanelOpen s_1cd1f0 (1)"))

Elapsed time: 2.661s

Unable to click on object 'Object Repository/Page_daz31f/button_SSD__controlPanel controlPanelOpen s_1cd1f0 (1)' (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to click on object 'Object Repository/Page_daz31f/button_SSD__controlPanel controlPanelOpen s_1cd1f0 (1)'

Hey, I’m afraid I don’t have the answer, but I’m getting a similar issue. I am, however, BRAND NEW to Katalon so I have no idea what I’m doing. But I was guessing that Katalon was unable to locate the element, so maybe it’s being defined wrong? I tried selecting by XPATH and selecting by Attributes, but neither of them worked better. My big problem is that sometimes it works and then I’ll run the test again a minute later and it doesn’t work, and then a minute later it does again. I’ve also tried adding a page load, and a waitForElementVisible, but the page load doesn’t change anything and the waitForElementVisible fails also.