Troubleshoot common exceptions when executing web tests


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/troubleshoot-common-execution-exceptions-web-test.html

Hello Katalon users

During your web tests' execution, you may encounter errors or exceptions with Katalon Studio. In this situation, we recommend checking this document first for resolving the exceptions yourself.

We would be appreciative of your help to contribute most encountered issues and their solutions if they are not documented yet.

In case the exception you are looking for isn’t on this document, please leave a comment below.

Happy Testing,

Katalon team

The JavaScript “solution” offered for the following situation is BAD and should not be promoted as a solution or even a workaround.

“org.openqa.selenium.WebDriverException: Element is not clickable at point (x, y). Other element would receive the click: …”

image

image

Click-prevention techniques (overlays, spinners) are used to control application state while the application is in a state of transition. Using any mechanism to subvert the intentions of the app developer places the application into an unknown state – a state the developer has deliberately guarded against – and renders the test case meaningless. (See Tip: DO NOT CHANGE THE AUT THROUGH TEST CODE).

Scenario
The user causes the app to make a request for more data.
The app uses async XHR/ajax to fulfill the request.
The app puts up a spinner, blocking the UI.
The server fails at some point.
The async fail handler receives an HTTP 500 and tries to deal with it.
Using the suggestion above, the TC has already moved on, dealing now with a broken page that doesn’t know its own state.
The test developer tries to figure out why the TC is now failing somewhere else receiving errors that make no sense.

@Jass @duyluong @ThanhTo Please remove this suggestion from the docs.

What’s needed is a way to detect reasons why a spinner gets “stuck”.

2 Likes

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