0

After I've upgraded Selenium version to 4.8.3 I'm no longer able to run my tests as I receive the following error:

java.lang.NoClassDefFoundError: org/openqa/selenium/ElementNotVisibleException

Has anyone encountered this issue and knows a fix? I'm using Intelij.

It is definitely something related to the Selenium version. I want to upgrade so I am able to run the tests locally again as with old selenium versions I'm receiving the java.io.IOException: Invalid Status code=403 text=Forbidden

Shawn
  • 4,064
  • 2
  • 11
  • 23
lalexa
  • 1

1 Answers1

0

Using Firefox and GeckoDriver

Using Selenium v4.10.0, GeckoDriver v0.33.0 and v114.0.1 you can use the minimum code block:

WebDriver driver = new FirefoxDriver();
driver.get("https://www.selenium.dev/");

Console Output:

Jun 11, 2023 3:58:24 AM org.openqa.selenium.remote.service.DriverService$Builder getLogOutput
INFO: Driver logs no longer sent to console by default; https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output

Using Chrome and ChromeDriver

Using Selenium v4.10.0, ChromeDriver v114.0 and v114.0 you can use the minimum code block:

ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized");
options.addArguments("--remote-allow-origins=*");
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.selenium.dev/");

Console Output:

Jun 11, 2023 3:58:24 AM org.openqa.selenium.remote.service.DriverService$Builder getLogOutput
INFO: Driver logs no longer sent to console by default; https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • Thank you but this is not working for me. It is resulting in java.lang.NoClassDefFoundError: org/openqa/selenium/ElementNotVisibleException – lalexa Jun 19 '23 at 12:33