Is there any way to run parallel tests in different browsers with Serenity?
I am automating my tests with Serenity BDD + Selenium Grid + Cucumber + Gradle.
At this moment, i can run my tests simultaneously in several instances of the same browser using Selenium Grid, but I am not able to run them in two different browsers (e.g. Internet Explorer and Chrome). I have tried, with no success, to define a RemoteWebDriver for each feature like this:
public SearchFlightsSteps() throws MalformedURLException {
DesiredCapabilities capability = DesiredCapabilities.chrome();
capability.setBrowserName("chrome");
capability.setPlatform(org.openqa.selenium.Platform.WINDOWS);
driver = new RemoteWebDriver(new URL("http://ip:4444/wd/hub"), capability);
ryanairHomePage = new RyanairHomePage(driver);
}
@Step
public void open() {
driver.get(RyanairHomePage.URL);
}
This opens the browsers, but when i try to get an element from the page, I got
net.serenitybdd.core.exceptions.SerenityManagedException: Expected enabled element was not enabled
That happens because the PageObject tries to use a Firefox browser instance instead of the one I give.
I don't know if this I want is possible in Serenity BDD, but any help would be appreciated.