bhecquet / seleniumRobot

SeleniumRobot is a test framework based on Selenium webdriver + Appium + Cucumber
Apache License 2.0
7 stars 7 forks source link

Error on configuration method remains even if test is OK #619

Closed bhecquet closed 9 months ago

bhecquet commented 11 months ago

Due to problem

Test is KO with error: class org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://<host>:4445/session/aaaddfdszf/se/cdp

leads to

class org.openqa.selenium.remote.RemoteWebDriver cannot be cast to class com.seleniumtests.driver.CustomEventFiringWebDriver (org.openqa.selenium.remote.RemoteWebDriver and com.seleniumtests.driver.CustomEventFiringWebDriver are in unnamed module of loader &apos;app&apos;)

and

java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 at com.seleniumtests.core.SeleniumTestsContextManager.getClassNameFromMethodConfiguration(SeleniumTestsContextManager.java:317) at com.seleniumtests.core.SeleniumTestsContextManager.insertThreadContext(SeleniumTestsContextManager.java:353) at com.seleniumtests.core.runner.SeleniumRobotTestListener.configureThreadContextBeforeInvoke(SeleniumRobotTestListener.java:511) at com.seleniumtests.core.runner.SeleniumRobotTestListener.beforeInvocation(SeleniumRobotTestListener.java:262) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)

Which, with replay causes the test to be OK, but configuration methods to fail, and so, the overall job is failed which sould not

bhecquet commented 11 months ago

This is caused when browser is created, but an exception occurs right after browser is created in WebUIDriver.createRemoteWebDriver()