narottamgla / selenium-bdd-cucumber

selenium-bdd-cucumber using serenity for WEB and API automation
14 stars 17 forks source link

Getting error #2

Open binuhill opened 3 years ago

binuhill commented 3 years ago

NING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by cucumber.deps.com.thoughtworks.xstream.core.util.Fields (file:/Users/binujacob/.gradle/caches/modules-2/files-2.1/io.cucumber/cucumber-jvm-deps/1.0.6/f099f06378ef35f9391fa2fbb41ac21d214fe737/cucumber-jvm-deps-1.0.6.jar) to field java.util.TreeMap.comparator WARNING: Please consider reporting this to the maintainers of cucumber.deps.com.thoughtworks.xstream.core.util.Fields WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Given I want to search in Google # GoogleSearchStep.iWantToSearchInGoogle() net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:157) at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:144) at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:114) at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:189) at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:184) at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:838) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:742) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:730) at com.uiautomation.actions.GoogleSearchActions.openGoogleSearchPage(GoogleSearchActions.java:16) at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b.CGLIB$openGoogleSearchPage$0() at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b$$FastClassByCGLIB$$e8c897c3.invoke() at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:426) at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:411) at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:386) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:134) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:63) at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b.openGoogleSearchPage() at com.uiautomation.steps.GoogleSearchStep.iWantToSearchInGoogle(GoogleSearchStep.java:16) at ✽.I want to search in Google(/Users/binujacob/Downloads/selenium-bdd-cucumber-master/src/test/resources/features/nlbc/googlesearch.feature:7) Caused by: net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (The driver is not executable: /Users/binujacob/Downloads/selenium-bdd-cucumber-master/lib/chromedriver at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:133) at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:153) at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:144) at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:114) at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:189) at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:184) at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:838) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:742) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:730) at com.uiautomation.actions.GoogleSearchActions.openGoogleSearchPage(GoogleSearchActions.java:16) at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b.CGLIB$openGoogleSearchPage$0() at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b$$FastClassByCGLIB$$e8c897c3.invoke() at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:426) at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:411) at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:386) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:134) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:63) at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b.openGoogleSearchPage() at com.uiautomation.steps.GoogleSearchStep.iWantToSearchInGoogle(GoogleSearchStep.java:16) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at cucumber.runtime.Utils$1.call(Utils.java:32) at cucumber.runtime.Timeout.timeout(Timeout.java:16) at cucumber.runtime.Utils.invoke(Utils.java:26) at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:37) at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:40) at cucumber.api.TestStep.executeStep(TestStep.java:102) at cucumber.api.TestStep.run(TestStep.java:83) at cucumber.api.TestCase.run(TestCase.java:58) at cucumber.runner.Runner.runPickle(Runner.java:80) at cucumber.runtime.Runtime.runFeature(Runtime.java:119) at cucumber.runtime.Runtime.run(Runtime.java:104) at cucumber.api.cli.Main.run(Main.java:36) at cucumber.api.cli.Main.main(Main.java:18) Caused by: java.lang.IllegalStateException: The driver is not executable: /Users/binujacob/Downloads/selenium-bdd-cucumber-master/lib/chromedriver at com.google.common.base.Preconditions.checkState(Preconditions.java:534) at net.serenitybdd.core.webdriver.servicepools.DriverServiceExecutable.checkExecutable(DriverServiceExecutable.java:120) at net.serenitybdd.core.webdriver.servicepools.DriverServiceExecutable.checkForMissingBinaries(DriverServiceExecutable.java:111) at net.serenitybdd.core.webdriver.servicepools.DriverServiceExecutable.asAFile(DriverServiceExecutable.java:98) at net.serenitybdd.core.webdriver.servicepools.ChromeServicePool.chromeDriverExecutable(ChromeServicePool.java:44) at net.serenitybdd.core.webdriver.servicepools.ChromeServicePool.newDriverService(ChromeServicePool.java:25) at net.serenitybdd.core.webdriver.servicepools.ChromeServicePool.newDriverService(ChromeServicePool.java:12) at net.serenitybdd.core.webdriver.servicepools.DriverServicePool.driverServiceWithName(DriverServicePool.java:54) at net.serenitybdd.core.webdriver.servicepools.DriverServicePool.getDriverService(DriverServicePool.java:45) at net.serenitybdd.core.webdriver.servicepools.DriverServicePool.start(DriverServicePool.java:60) at net.serenitybdd.core.webdriver.servicepools.DriverServicePool.ensureServiceIsRunning(DriverServicePool.java:86) at net.serenitybdd.core.webdriver.driverproviders.ChromeDriverProvider.getDriverServicePool(ChromeDriverProvider.java:29) at net.serenitybdd.core.webdriver.driverproviders.ChromeDriverProvider.newInstance(ChromeDriverProvider.java:48) at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:123) ... 36 more

When I search for 'Serenity BDD'                                                   # GoogleSearchStep.iSearchFor(String)
Then I should see link to 'Serenity BDD - Automated Acceptance Testing with Style' # GoogleSearchStep.iShouldSeeLinkTo(String)

Scenario Outline: Google search multiple # /Users/binujacob/Downloads/selenium-bdd-cucumber-master/src/test/resources/features/nlbc/googlesearch.feature:11 Given I want to search in Google When I search for '' Then I should see link to ''

Examples: 

Scenario Outline: Google search multiple # /Users/binujacob/Downloads/selenium-bdd-cucumber-master/src/test/resources/features/nlbc/googlesearch.feature:17 Given I want to search in Google # GoogleSearchStep.iWantToSearchInGoogle() When I search for 'Serenity BDD' # GoogleSearchStep.iSearchFor(String) Then I should see link to 'Serenity BDD - Automated Acceptance Testing with Style' # GoogleSearchStep.iShouldSeeLinkTo(String)

Scenario Outline: Google search multiple # /Users/binujacob/Downloads/selenium-bdd-cucumber-master/src/test/resources/features/nlbc/googlesearch.feature:18 Given I want to search in Google # GoogleSearchStep.iWantToSearchInGoogle() When I search for 'Cucumber' # GoogleSearchStep.iSearchFor(String) Then I should see link to 'Cucumber' # GoogleSearchStep.iShouldSeeLinkTo(String)

Failed scenarios: /Users/binujacob/Downloads/selenium-bdd-cucumber-master/src/test/resources/features/nlbc/googlesearch.feature:6 # Google search

3 Scenarios (1 failed, 2 passed) 9 Steps (1 failed, 2 skipped, 6 passed) 0m1.699s

net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:157) at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:144) at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:114) at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:189) at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:184) at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:838) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:742) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:730) at com.uiautomation.actions.GoogleSearchActions.openGoogleSearchPage(GoogleSearchActions.java:16) at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b.CGLIB$openGoogleSearchPage$0() at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b$$FastClassByCGLIB$$e8c897c3.invoke() at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:426) at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:411) at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:386) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:134) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:63) at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b.openGoogleSearchPage() at com.uiautomation.steps.GoogleSearchStep.iWantToSearchInGoogle(GoogleSearchStep.java:16) at ✽.I want to search in Google(/Users/binujacob/Downloads/selenium-bdd-cucumber-master/src/test/resources/features/nlbc/googlesearch.feature:7) Caused by: net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (The driver is not executable: /Users/binujacob/Downloads/selenium-bdd-cucumber-master/lib/chromedriver at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:133) at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:153) at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:144) at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:114) at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:189) at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:184) at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:838) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:742) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:730) at com.uiautomation.actions.GoogleSearchActions.openGoogleSearchPage(GoogleSearchActions.java:16) at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b.CGLIB$openGoogleSearchPage$0() at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b$$FastClassByCGLIB$$e8c897c3.invoke() at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:426) at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:411) at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:386) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:134) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:63) at com.uiautomation.actions.GoogleSearchActions$$EnhancerByCGLIB$$6e462a0b.openGoogleSearchPage() at com.uiautomation.steps.GoogleSearchStep.iWantToSearchInGoogle(GoogleSearchStep.java:16) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at cucumber.runtime.Utils$1.call(Utils.java:32) at cucumber.runtime.Timeout.timeout(Timeout.java:16) at cucumber.runtime.Utils.invoke(Utils.java:26) at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:37) at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:40) at cucumber.api.TestStep.executeStep(TestStep.java:102) at cucumber.api.TestStep.run(TestStep.java:83) at cucumber.api.TestCase.run(TestCase.java:58) at cucumber.runner.Runner.runPickle(Runner.java:80) at cucumber.runtime.Runtime.runFeature(Runtime.java:119) at cucumber.runtime.Runtime.run(Runtime.java:104) at cucumber.api.cli.Main.run(Main.java:36) at cucumber.api.cli.Main.main(Main.java:18) Caused by: java.lang.IllegalStateException: The driver is not executable: /Users/binujacob/Downloads/selenium-bdd-cucumber-master/lib/chromedriver at com.google.common.base.Preconditions.checkState(Preconditions.java:534) at net.serenitybdd.core.webdriver.servicepools.DriverServiceExecutable.checkExecutable(DriverServiceExecutable.java:120) at net.serenitybdd.core.webdriver.servicepools.DriverServiceExecutable.checkForMissingBinaries(DriverServiceExecutable.java:111) at net.serenitybdd.core.webdriver.servicepools.DriverServiceExecutable.asAFile(DriverServiceExecutable.java:98) at net.serenitybdd.core.webdriver.servicepools.ChromeServicePool.chromeDriverExecutable(ChromeServicePool.java:44) at net.serenitybdd.core.webdriver.servicepools.ChromeServicePool.newDriverService(ChromeServicePool.java:25) at net.serenitybdd.core.webdriver.servicepools.ChromeServicePool.newDriverService(ChromeServicePool.java:12) at net.serenitybdd.core.webdriver.servicepools.DriverServicePool.driverServiceWithName(DriverServicePool.java:54) at net.serenitybdd.core.webdriver.servicepools.DriverServicePool.getDriverService(DriverServicePool.java:45) at net.serenitybdd.core.webdriver.servicepools.DriverServicePool.start(DriverServicePool.java:60) at net.serenitybdd.core.webdriver.servicepools.DriverServicePool.ensureServiceIsRunning(DriverServicePool.java:86) at net.serenitybdd.core.webdriver.driverproviders.ChromeDriverProvider.getDriverServicePool(ChromeDriverProvider.java:29) at net.serenitybdd.core.webdriver.driverproviders.ChromeDriverProvider.newInstance(ChromeDriverProvider.java:48) at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:123) ... 36 more

Please suggest

narottamgla commented 3 years ago

Please update chromedriver.exe as per chrome browser version