You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm initializing manually an AndroidDriver (due to the issue with the unrecognized appium capabilities when trying to use the auto setup). The test runs successfully but after it passes, the executions breaks with the error: "class io.appium.java_client.android.AndroidDriver cannot be cast to class net.thucydides.core.webdriver.WebDriverFacade (io.appium.java_client.android.AndroidDriver and net.thucydides.core.webdriver.WebDriverFacade are in unnamed module of loader 'app')"
The issue happens in line 370 of the class SerenityReporterParallel where the method handleTestCaseFinished is adding a new TestFinishedEvent to the step event bus.
The constructor of TestFinishedEvent ends calling the method saveCurrentWebDriverContext and in line 36, WebDriverFacade currentDriver = (WebDriverFacade) SerenityWebdriverManager.inThisTestThread().getCurrentDriver();
the cast to WebDriverFacade fails due to incompatibility with the AndroidDriver loaded.
What did you expect to happen?
The test suite should run successfully with an AndroidDriver configured manually
Serenity BDD version
4.2.8
JDK version
17
Execution environment
Mac OS Sonoma 14.7.1
How to reproduce the bug.
Due to confidentiality issues I can't post the code I did for this purpose. You just need to start with the serenity-cucumber-starter project and then create a new instance of an AndroidDriver. Then just call theActorCalled(userAlias).can(BrowseTheWeb.with(new AppiumDriverFactory().createDriver())) and finally run a test against an Android app.
How can we make it happen?
Work on this myself and propose a PR (with Serenity BDD team guidance)
The text was updated successfully, but these errors were encountered:
The saveCurrentWebDriverContext() is assuming that the driver is manager by Serenity (and therefore an instance of WebDriverFacade). You need to add logic to allow the code to cater for normal WebDriver (or RemoteWebDriver) instances.
What happened?
I'm initializing manually an AndroidDriver (due to the issue with the unrecognized appium capabilities when trying to use the auto setup). The test runs successfully but after it passes, the executions breaks with the error: "class io.appium.java_client.android.AndroidDriver cannot be cast to class net.thucydides.core.webdriver.WebDriverFacade (io.appium.java_client.android.AndroidDriver and net.thucydides.core.webdriver.WebDriverFacade are in unnamed module of loader 'app')"
The issue happens in line 370 of the class SerenityReporterParallel where the method handleTestCaseFinished is adding a new TestFinishedEvent to the step event bus.
The constructor of TestFinishedEvent ends calling the method saveCurrentWebDriverContext and in line 36,
WebDriverFacade currentDriver = (WebDriverFacade) SerenityWebdriverManager.inThisTestThread().getCurrentDriver();
the cast to WebDriverFacade fails due to incompatibility with the AndroidDriver loaded.
What did you expect to happen?
The test suite should run successfully with an AndroidDriver configured manually
Serenity BDD version
4.2.8
JDK version
17
Execution environment
Mac OS Sonoma 14.7.1
How to reproduce the bug.
Due to confidentiality issues I can't post the code I did for this purpose. You just need to start with the serenity-cucumber-starter project and then create a new instance of an AndroidDriver. Then just call theActorCalled(userAlias).can(BrowseTheWeb.with(new AppiumDriverFactory().createDriver())) and finally run a test against an Android app.
How can we make it happen?
Work on this myself and propose a PR (with Serenity BDD team guidance)
The text was updated successfully, but these errors were encountered: