vikramvi / AppiumSerenityPOC

POC showing native android app automation with Appium & Serenity BDD framework
https://www.linkedin.com/pulse/managing-automation-projects-efficiently-one-best-bdd-v-ingleshwar/
36 stars 26 forks source link

Could not instantiate class io.appium.java_client.AppiumDriver #12

Open anilqa opened 5 years ago

anilqa commented 5 years ago

EST STARTED: User is not allowed to login with invalid credentials -------------------------------------------------------------------(login-page-scenarios;user-is-not-allowed-to-login-with-invalid-credentials) [main] WARN net.thucydides.core.pages.Pages - Failed to instantiate page of type class com.serenity.appium.poc.pages.WordPressLoginPage ({}) net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class io.appium.java_client.AppiumDriver at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:154) at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:142) at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:112) at com.serenity.appium.poc.pages.MobilePageObject$1.apply(MobilePageObject.java:29) at com.serenity.appium.poc.pages.MobilePageObject$1.apply(MobilePageObject.java:1) at net.serenitybdd.core.pages.PageObject.(PageObject.java:137) at com.serenity.appium.poc.pages.MobilePageObject.(MobilePageObject.java:24) at com.serenity.appium.poc.pages.WordPressLoginPage.(WordPressLoginPage.java:17) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at net.thucydides.core.pages.Pages.createFromConstructorWithWebdriver(Pages.java:266) at net.thucydides.core.pages.Pages.getCurrentPageOfType(Pages.java:206) at net.thucydides.core.pages.Pages.getPage(Pages.java:90) at net.thucydides.core.steps.PageObjectDependencyInjector.instantiatePageObjectIfNotAssigned(PageObjectDependencyInjector.java:55) at net.thucydides.core.steps.PageObjectDependencyInjector.injectDependenciesInto(PageObjectDependencyInjector.java:33) at net.thucydides.core.steps.StepFactory.injectOtherDependenciesInto(StepFactory.java:166) at net.thucydides.core.steps.StepFactory.instantiateNewStepLibraryFor(StepFactory.java:156) at net.thucydides.core.steps.StepFactory.instantiateNewStepLibraryFor(StepFactory.java:139) at net.thucydides.core.steps.StepFactory.getNewStepLibraryFor(StepFactory.java:86) at net.thucydides.core.steps.IndividualInstancesByDefaultStepCreationStrategy.initiateStepsFor(IndividualInstancesByDefaultStepCreationStrategy.java:16) at net.thucydides.core.steps.StepAnnotations.instantiateAnyUnitiaializedSteps(StepAnnotations.java:76) at net.thucydides.core.steps.StepAnnotations.instanciateScenarioStepFields(StepAnnotations.java:60) at net.thucydides.core.steps.StepAnnotations.injectScenarioStepsInto(StepAnnotations.java:42) at net.serenitybdd.core.Serenity.injectScenarioStepsInto(Serenity.java:135) at net.serenitybdd.core.Serenity.initializeWithNoStepListener(Serenity.java:101) at cucumber.runtime.SerenityObjectFactory.newInstance(SerenityObjectFactory.java:68) at cucumber.runtime.SerenityObjectFactory.cacheNewInstance(SerenityObjectFactory.java:51) at cucumber.runtime.SerenityObjectFactory.getInstance(SerenityObjectFactory.java:41) 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.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:140) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:118) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:56) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:127) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate new WebDriver instance of type class io.appium.java_client.AppiumDriver (It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible Build info: version: '3.141.5', revision: 'd54ebd709a', time: '2018-11-06T11:42:16'

anilqa commented 5 years ago

Hi Vikram,

Could you please help me in resolving this issue?

anujtiwari24 commented 5 years ago

I am also facing the same issue. Not able to run the tests on Android. Please help