Skip to main content

Web element not found exception

When you encounter the following exception: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id ... not found.

There are two possible causes:

This can be caused by incorrect XPath locators.

  1. Open your page using Chrome.
  2. Right-click on your desired test object and select Inspect.
  3. In the Elements tab of DevTool, right-click on your target object and select Copy > Copy XPath.
  4. Open your test object in Katalon Studio and update your XPath property with the copied value.
    Alternatively, You can also try optimizing your test object properties by referring to this document here: Optimize object identification and tools.

The exception can also be caused by outdated WebDriver.

On the main toolbar, select Tool > Update WebDrivers > select the corresponding browser in the drop-down list.