error java.lang.IncompatibleClassChangeError rg.openqa.selenium.remote.RemoteWebElement can not implement org.openqa.selenium.WebElement, because it is not an interface

0 votes

 I am trying to run simple script and getting this error: 

1592462763876 mozrunner::runner INFO Running command: "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\hpinko\\AppData\\Local\\Temp\\rust_mozprofilelB6aFs"

console.error: Enterprise Policies: 

  Unknown policy: HomepageDisplay

console.error: Enterprise Policies: 

  Unknown policy: CustomHomepage

1592462764466 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons

1592462764466 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry

1592462764466 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/

1592462764466 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*

JavaScript error: resource:///modules/sessionstore/SessionStore.jsm, line 1325: uncaught exception: 2147746065

1592462766164 Marionette INFO Listening on port 64908

1592462766489 Marionette WARN TLS certificate errors will be ignored for this session

Jun 18, 2020 9:46:06 AM org.openqa.selenium.remote.ProtocolHandshake createSession

INFO: Detected dialect: W3C

Exception in thread "main" java.lang.IncompatibleClassChangeError: class org.openqa.selenium.remote.RemoteWebElement can not implement org.openqa.selenium.WebElement, because it is not an interface (org.openqa.selenium.WebElement is in unnamed module of loader 'app')

at java.base/java.lang.ClassLoader.defineClass1(Native Method)

at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)

at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)

at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)

at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

at org.openqa.selenium.remote.Dialect$2.getCommandCodec(Dialect.java:47)

at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138)

at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)

at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)

at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)

at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:147)

at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:125)

at hp_test_package.Myclass.main(Myclass.java:14)



script is:

package hp_test_package;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;

import org.openqa.selenium.firefox.FirefoxDriver;

public class Myclass {

 public static void main(String[] args) throws InterruptedException 

     {

     System.setProperty("webdriver.gecko.driver", "C:\\Users\\hpinko\\Desktop\\geckodriver.exe");

     WebDriver driver = new FirefoxDriver();

     driver.get("https://www.gmail.com");

     driver.manage().window().maximize();

     Thread.sleep(2000);
 }

}
Jun 18 in Selenium by Edureka
• 120 points
399 views

This might be a dependency error. You are trying to implement something that's actually not an interface. 

For more  info refer to https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/remote/RemoteWebDriver.html

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Selenium

0 votes
4 answers
0 votes
1 answer

Firefox Error: “Your connection is not secure” while launching driver with Selenium 3.0.1 using Java

Download Firefox 55 beta and set capabilities.setCapability("acceptInsecureCerts", true); Here ...READ MORE

answered Sep 17, 2018 in Selenium by Meci Matt
• 9,460 points
768 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,520 points
4,029 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,978 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
2,919 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
3,351 views