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
Trying to reuse old tests with the last version of FluentLenium, we encountered a blocking error.
org.openqa.selenium.WebDriverException: Browser failed to start, test [ ... ] execution interrupted.
Caused by: [ Index 0 out of bounds for length 0]
Build info: version: '4.9.0', revision: 'd7057100a6'
System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '13.4.1', java.version: '19.0.2'
Driver info: driver.version: unknown
Further :
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at io.fluentlenium.configuration.DefaultWebDriverFactories$ChromeWebDriverFactory.newInstance(DefaultWebDriverFactories.java:64)
Looking deeply at what happens, it comes from the DefaultWebDriverFactories.
The (Capabilities) args[0]; fails because when we are using default FluentTest configuration, the newInstance function is called from ReflectiveWebDriverFactory with a null array of args, that array being the third constructor parameter from the driver factory...
The args on the last line here is a local attribute of a WebDriver factory, which are taken form the third+ arguments of the factory constructor. super("chrome", "org.openqa.selenium.chrome.ChromeDriver");... Which doesn't exist, leading in an empty array.
How to reproduce?
The Basic FluentLenium test on the quickstart page will simply fail the same way, in a new empty project.
Current fix
To fix our tests, we override a method to have default (unused) capabilities and skip the line looking at the empty array :
@Override
public Capabilities getCapabilities() {
return new MutableCapabilities(Map.of("cloud:options", Map.of("name", this.getClass().getSimpleName())));
}
I don't know if the WebDriverFactories should simply pay attention to the fact that the args array can be empty. I would assume something as change in a recent version of FluentLenium.
The text was updated successfully, but these errors were encountered:
Trying to reuse old tests with the last version of FluentLenium, we encountered a blocking error.
Further :
Looking deeply at what happens, it comes from the
DefaultWebDriverFactories
.The
(Capabilities) args[0];
fails because when we are using defaultFluentTest
configuration, thenewInstance
function is called fromReflectiveWebDriverFactory
with a null array of args, that array being the third constructor parameter from the driver factory...The
args
on the last line here is a local attribute of a WebDriver factory, which are taken form the third+ arguments of the factory constructor.super("chrome", "org.openqa.selenium.chrome.ChromeDriver");
... Which doesn't exist, leading in an empty array.How to reproduce?
The Basic FluentLenium test on the quickstart page will simply fail the same way, in a new empty project.
Current fix
To fix our tests, we override a method to have default (unused) capabilities and skip the line looking at the empty array :
I don't know if the WebDriverFactories should simply pay attention to the fact that the args array can be empty. I would assume something as change in a recent version of FluentLenium.
The text was updated successfully, but these errors were encountered: