Skip to content Skip to sidebar Skip to footer

Katalon Studio Creating Element With Webdriver Not Recognised When Used In Javascript

I'm trying to use the executeJavascript method in Katalon Studio, and having written a couple lines of code that look really similar to that in the documentation example: document

Solution 1:

This error message...

org.openqa.selenium.WebDriverException: unknown error: element is not defined

...implies that the ChromeDriver was unable to communicate with the Browsing Context i.e. Chrome Browser session.

Your main issue is the version compatibility between the binaries you are using as follows :

  • You are using chromedriver=2.35
  • Release Notes of chromedriver=2.35 clearly mentions the following :

Supports Chrome v62-64

  • You are using chrome=66.0
  • Release Notes of ChromeDriver v2.38 clearly mentions the following :

Supports Chrome v65-67

  • Your Selenium Client version is 3.7.1 of 2017-11-06T21:07:36.161Z which is almost half year older.
  • Your JDK version is 1.8.0_102 which is pretty ancient.

So there is a clear mismatch between the JDK v8u102, Selenium Client v3.7.1 , ChromeDriver version v2.35 and the Chrome Browser v66.0

Solution

  • Upgrade JDK to recent levels JDK 8u171.
  • Upgrade Selenium to current levels Version 3.12.0.
  • Upgrade ChromeDriver to current ChromeDriver v2.38 level.
  • Keep Chrome version at Chrome v66.x levels. (as per ChromeDriver v2.38 release notes)
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
  • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your @Test.

Post a Comment for "Katalon Studio Creating Element With Webdriver Not Recognised When Used In Javascript"