serenity-bdd / serenity-core

Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.
http://serenity-bdd.info
Other
723 stars 518 forks source link

Could not instantiate class org.openqa.selenium.chrome.ChromeDriver #2844

Closed prashantrbs closed 2 years ago

prashantrbs commented 2 years ago

Hi, I keep getting issues when I run maven project however if i run same project in gradle it works, please let me know what is causing this. the error log is below

net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:144) at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:132) at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:102) at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:172) at mavenAvantageSerenityIntellij@1.0-SNAPSHOT/StepDefinitions.Account.EmailSignInStepDefinition.userIsOn(EmailSignInStepDefinition.java:86) at ?.user is on "WSBCLoginPage"(file:///C:/Users/User/Desktop/mavenAvantageSerenityIntellij/src/test/java/features/Account/ACCT-1875%20Ability%20to%20enter%20their%20email%20address%20on%20Forgot%20Password%20flow/ForgotPassword.feature:28) Caused by: net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (session not created: This version of ChromeDriver only supports Chrome version 103 Current browser version is 102.0.5005.115 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'DESKTOP-NRNN1B7', ip: '192.168.225.31', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.13' Driver info: driver.version: ProvideNewDriver remote stacktrace: Backtrace: Ordinal0 [0x00C356B3+2184883] Ordinal0 [0x00BCE5F1+1762801]

Thanks.

zzoubian commented 2 years ago

Your browser is Chrome v 102, whereas the web driver you are using supports Chrome v 103. https://chromedriver.chromium.org/downloads

prashantrbs commented 2 years ago

I did this still no luck.

prashantrbs commented 2 years ago

I was not extending PageObject class so which was causing issue. i am closing this