Hi, everyone.
I'm faced with a problem: browser does not start to run automated tests using _Firefox 54_.
I did the following configurations to my MAVEN project:
I run maven goals clean package verify, as I did before, but result was the following:
1494590628529 geckodriver INFO Listening on 127.0.0.1:6406
1494590628529 geckodriver INFO Listening on 127.0.0.1:8801
net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver
at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:148)
at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:135)
at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:105)
at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:180)
at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:175)
at br.jus.tjpb.testes.fta.pages.LoginPage.acessarAPagina(LoginPage.java:24)
at br.jus.tjpb.testes.fta.DadosPia.usuario(DadosPia.java:18)
at ✽.Dado que sou um "Gestor"(br/jus/tjpb/testes/fta/features/UC001-ConsultarInstituicoes/PIA7-FA04-ExcluirInstituicao.feature:18)
Caused by: net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (browserName was not a boolean
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'TJ098206', ip: '10.100.218.37', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: FirefoxDriver
remote stacktrace: stack backtrace:
0: 0x47f1a6 - <no info>
1: 0x437327 - <no info>
2: 0x42bd8c - <no info>
3: 0x437ded - <no info>
4: 0x41a7b3 - <no info>
5: 0x40570c - <no info>
6: 0x692906 - <no info>
7: 0x413838 - <no info>
8: 0x68d401 - <no info>
9: 0x74de62c4 - BaseThreadInitThunk
10: 0x77750fd9 - RtlSubscribeWnfStateChangeNotification
at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:136)
at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:144)
at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:135)
at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:105)
at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:180)
at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:175)
at br.jus.tjpb.testes.fta.pages.LoginPage.acessarAPagina(LoginPage.java:24)
at br.jus.tjpb.testes.fta.DadosPia.usuario(DadosPia.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cucumber.runtime.Utils$1.call(Utils.java:40)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:34)
at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38)
at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
at cucumber.runtime.Runtime.runStep(Runtime.java:300)
at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
at cucumber.runtime.model.CucumberScenario.runBackground(CucumberScenario.java:59)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:42)
at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
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.ExamplesRunner.run(ExamplesRunner.java:59)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
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.ScenarioOutlineRunner.run(ScenarioOutlineRunner.java:53)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
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:70)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
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.api.junit.Cucumber.run(Cucumber.java:100)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: org.openqa.selenium.InvalidArgumentException: browserName was not a boolean
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'TJ098206', ip: '10.100.218.37', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: FirefoxDriver
remote stacktrace: stack backtrace:
0: 0x47f1a6 - <no info>
1: 0x437327 - <no info>
2: 0x42bd8c - <no info>
3: 0x437ded - <no info>
4: 0x41a7b3 - <no info>
5: 0x40570c - <no info>
6: 0x692906 - <no info>
7: 0x413838 - <no info>
8: 0x68d401 - <no info>
9: 0x74de62c4 - BaseThreadInitThunk
10: 0x77750fd9 - RtlSubscribeWnfStateChangeNotification
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 org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$22(ProtocolHandshake.java:365)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:368)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:159)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:137)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:108)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:137)
at net.serenitybdd.core.webdriver.servicepools.GeckoServicePool.newDriverInstance(GeckoServicePool.java:25)
at net.serenitybdd.core.webdriver.servicepools.DriverServicePool.newDriver(DriverServicePool.java:77)
at net.serenitybdd.core.webdriver.driverproviders.FirefoxDriverProvider.newMarionetteDriver(FirefoxDriverProvider.java:76)
at net.serenitybdd.core.webdriver.driverproviders.FirefoxDriverProvider.newInstance(FirefoxDriverProvider.java:52)
at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:126)
at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:144)
at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:135)
at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:105)
at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:180)
at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:175)
at br.jus.tjpb.testes.fta.pages.LoginPage.acessarAPagina(LoginPage.java:24)
at br.jus.tjpb.testes.fta.DadosPia.usuario(DadosPia.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cucumber.runtime.Utils$1.call(Utils.java:40)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:34)
at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38)
at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
at cucumber.runtime.Runtime.runStep(Runtime.java:300)
at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
at cucumber.runtime.model.CucumberScenario.runBackground(CucumberScenario.java:59)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:42)
at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
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.ExamplesRunner.run(ExamplesRunner.java:59)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
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.ScenarioOutlineRunner.run(ScenarioOutlineRunner.java:53)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
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:70)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
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.api.junit.Cucumber.run(Cucumber.java:100)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Exception in thread "Thread-1" java.lang.ExceptionInInitializerError
at org.openqa.selenium.os.Kernel32.<clinit>(Kernel32.java:24)
at org.openqa.selenium.os.ProcessUtils.getProcessId(ProcessUtils.java:184)
at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:128)
at org.openqa.selenium.os.ProcessUtils.killProcess(ProcessUtils.java:81)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.destroyHarder(UnixProcess.java:246)
at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$200(UnixProcess.java:200)
at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:126)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:153)
at org.openqa.selenium.remote.service.DriverService.stop(DriverService.java:221)
at net.serenitybdd.core.webdriver.servicepools.StopServiceHook.run(StopServiceHook.java:15)
Caused by: java.lang.IllegalStateException: Shutdown in progress
at java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:66)
at java.lang.Runtime.addShutdownHook(Runtime.java:211)
at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:724)
at com.sun.jna.Native.loadNativeLibrary(Native.java:678)
at com.sun.jna.Native.<clinit>(Native.java:106)
I appreciate any help, because I'm trying to update from previous versions.
Thank you.
Serenity is not compatible with Selenium 3.4 yet. The Selenium APIs are not backward compatible, so that is possibly the issue. But the stack trace looks like a Selenium/Firefox/gecko issue.
Hi @wakaleo , what is the last version of Selenium that Serenity is compatible with?
2.53
Mileage may vary with 3.x
@wakaleo - will there be work for ongoing compatibility with selenium newer versions ?
The next major version (probably out next month) will support Selenium 3.
@wakaleo
i am using sereniy core 1.4
selenium 2.53.1
getting below error
Could not instantiate new WebDriver instance of type class org.openqa.selenium.safari.SafariDriver
we need safaridriver.exe for this?
safari browser opened but not typed url....
This is most likely a WebDriver setup or compatibility issue (not related to Serenity). See https://github.com/SeleniumHQ/selenium/wiki/SafariDriver - note that according to the documentation Safari is unlikely to work for recent versions on Windows.
Este framework es una mierda, no funciona el proyecto de test porque sale este mensaje
ERROR net.thucydides.core.webdriver.WebDriverFacade - FAILED TO CREATE NEW WEBDRIVER_DRIVER INSTANCE class org.openqa.selenium.firefox.FirefoxDriver: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (Timed out waiting 45 seconds for Firefox to start.
y no hay documentacion de como cambiar la configuracion del driver, no lo recomendaré a nadie.
No need to be rude. This is a classic WebDriver/Firefox compatibility issue - make sure you have the correct version of the geckodriver on your path or configured in your config files. See https://serenity-bdd.github.io/theserenitybook/latest/web-testing-in-serenity.html
Hi I am using 2.0.18 Serenity Version & same version for
Firefox version 72.0.1
selenium-server-3.141.5
and I am getting below error
"net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (Timed out waiting 45 seconds for Firefox to start."
How to resolve this ?
Using the latest recommended versions should fix this. And let serenity pick the selenium version. And make sure your geckodriver is up to date.
Can you please let me know the latest fixed versions ?
Sent from Yahoo Mail on Android
On Thu, Feb 6, 2020 at 2:40 PM, John Ferguson Smartnotifications@github.com wrote:
Using the latest recommended versions should fix this
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
https://github.com/serenity-bdd/serenity-core/blob/master/README.md#what-is-the-latest-stable-version-i-should-use
It’s not a question of fixes, it’s just that the libraries need to be compatible with the latest browser and driver versions.
My POM:
<groupId>SerenityPOC</groupId>
<artifactId>SBDDPOCEBay</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Serenity project with JUnit and WebDriver</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!--<serenity.version>1.8.3</serenity.version>-->
<!--<serenity.version>2.0.18</serenity.version>-->
<serenity.version>2.1.4</serenity.version>
<webdriver.driver>firefox</webdriver.driver>
<webdriver.gecko.driver>C:\Users\vaibhav_mandave\Desktop\geckodriver-v0.26.0-win64\geckodriver.exe</webdriver.gecko.driver>
<!--<webdriver.firefox.driver>C:\Program Files\Mozilla Firefox\firefox.exe</webdriver.firefox.driver>-->
</properties>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray-plugins</name>
<url>http://jcenter.bintray.com</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay-webdriver</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
<version>3.8.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-tc</version>
<configuration>
<files>
<file>${basedir}/serenity.properties</file>
</files>
<outputFile>
${basedir}/serenity.properties
</outputFile>
</configuration>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
<goal>write-project-properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<systemPropertyVariables>
<echo>${cucumber.options}</echo>
<cucumber.options>${cucumber.options}</cucumber.options>
<Browser>${Browser}</Browser>
</systemPropertyVariables>
<perCoreThreadCount>false</perCoreThreadCount>
<threadCount>${NumberOfThreads}</threadCount>
<parallel>classes</parallel>
<includes>
<include>**/SeleniumBDDTest.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>acceptance-test</id>
<phase>integration-test</phase>
<!--<goals>-->
<!--<goal>integration-test</goal>-->
<!--</goals>-->
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<phase>post-test</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>main.java.framework.Report</mainClass>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<includes>
<include>**/*Test.java</include>
<include>**/Test*.java</include>
<include>**/When*.java</include>
<include>**/*Story.java</include>
</includes>
<argLine>-Xmx512m</argLine>
<systemPropertyVariables>
<webdriver.driver>${webdriver.driver}</webdriver.driver>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<!--<goals>-->
<!--<!–<goal>integration-test</goal>–>-->
<!--<goal>verify</goal>-->
<!--</goals>-->
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.version}</version>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Now it is not even launching Firefox
How to resolve this ?
Firefox is launching but I am getting below error
net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:15429
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'PUNITP384092D', ip: '10.174.16.36', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_202'
Driver info: driver.version: ProvideNewDriver). See below for more details.
at SerenityPOCPkg.steps.NavigatingUser.isOnTheHomePage(NavigatingUser.java:20)
at SerenityPOCPkg.features.search.WhenBrowsingProductCategories.shouldBeAbleToNavigateToTheMotorsCategory(WhenBrowsingProductCategories.java:37)
[main] INFO net.thucydides.core.requirements.PackageRequirementsTagProvider - Loading requirements from package requirements at: SerenityPOCPkg.features
[main] ERROR net.thucydides.core.steps.ConsoleLoggingListener -
How to resolve this ?
Use the latest versions
Hi John,
I have seen your "Serenity BDD Tutorial #2 - Introducing Screenplay" you tube tutorial.
You have explained Ebay page clicking on Motors and checking Page Title contains "Used and New Motors".
I have a complex ask.
I will click on 1. Electronics (category) 2. Cell Phones, Smart Watches & Accessories (category1)
So here I want to navigate by clicking / selecting and check that the Product is in the eBay shopping cart
So my question is can we code as below ?
@Override
@Step("{0} navigates to the #category category" , "{1} navigates to the #category1 category1")
public
actor.attemptsTo(
Open.browserOn(theEbayHomePage),
Click.on(NavigationBar.category(category))
,Click.on(NavigationBar.category1(category1))
);
}
Means @Step will contain {0} navigates to the #category category" and "{1} navigates to the #category1 category1") and so on etc.
Or is there any better approach to navigate using clicks and check the product in the eBay Shopping Cart ?
My @Test will look as below
@Test
public void shouldBeAbleToViewSmartPhonesinShoppingCartScreenPlayPattern(){
Actor UATUser = Actor.named("uatUser");
givenThat(UATUser).can(BrowseTheWeb.with(driver));
when(UATUser).attemptsTo(NavigateTo.theCategory(Category.Electronics));
then(UATUser).should(seeThat(TheWebPage.title(), containsString("Electronics products for sale | eBay")));
when(UATUser).attemptsTo(NavigateTo.theCategory1(Category1.CellPhonesSmartWatchesAccessories));
then(UATUser).should(seeThat(TheWebPage.title(), containsString("Cell Phones, Smart Watches & Accessories for sale | eBay")));
-- I will add some more when then pairs to this