Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Petar Tahchiev
    @ptahchiev
    parallel testing is coming to junit later in august
    would that be enough to enable parallel testing of selenium (multiple browsers/tabs each testing different scenario in parallel)
    ?
    pansujit
    @pansujit

    Hello,
    I am getting problem "org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService" while running in remotely. I have created a hub in windows using
    $ java -jar selenium-server-standalone-3.13.0.jar -role hub and
    Create node in mac using
    $ java -jar selenium-server-standalone-3.13.0.jar -role node -hub http://192.168.1.46:4444/grid/register/
    It is well connected.
    But when I ran test using command
    $ mvn clean test -Dremote=true -Denvironment=valid2 -Dheadless=false -Dbrowser=chrome -DseleniumGridURL=http://192.168.1.46:4444/wd/hub
    I ran with above error. I change failsafe plugin to surefire, so I am running "Test".
    It is working perfectly on without grid but in grid got following stackTrace:
    Local Operating System: MAC OS X
    Local Architecture: x86_64
    Selected Browser: chrome
    Connecting to Selenium Grid: true

    Unable to capture screenshot...
    org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
    Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:32:19.891Z'
    System info: host: 'sujits-MBP', ip: 'fe80:0:0:0:1475:93ab:1da4:ef21%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.5', java.version: '1.8.0_144'
    Driver info: driver.version: unknown
    Command duration or timeout: 42 milliseconds
    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.ErrorHandler.createThrowable(ErrorHandler.java:214)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
    at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
    at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
    at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
    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:126)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:207)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:130)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:143)
    at com.lazerycode.selenium.config.DriverFactory.instantiateWebDriver(DriverFactory.java:94)
    at com.lazerycode.selenium.config.DriverFactory.getDriver(DriverFactory.java:44)
    at com.lazerycode.selenium.DriverBase.getDriver(DriverBase.java:28)
    at com.lazerycode.selenium.listeners.ScreenshotListener.onTestFailure(ScreenshotListener.java:51)
    at org.testng.internal.TestListenerHelper.runTestListeners(TestListenerHelper.java:67)
    at org.testng.internal.Invoker.runTestListeners(Invoker.java:1389)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1042)
    at org.testng.internal.TestMethodWorker.invokeTestMethod

    PeteanRaduIonut
    @PeteanRaduIonut
    Hi ,
    I've created a new class with tests. I didn't manage to run tests from this class.
    PeteanRaduIonut
    @PeteanRaduIonut
    After reading older post I noticed that I have to add "IT" to my class
    Mark Collin
    @Ardesco
    Yup, it’s a maven failsafe default
    PeteanRaduIonut
    @PeteanRaduIonut
    1. I managed to run the test on grid , but only on docker with firefox and chrome.
      I get some error when running on a grid with windows node (WIN7)
      org.openqa.selenium.remote.UnreachableBrowserException:
      Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
      Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z'
      System info: host: 'Laptop527', ip: '192.168.11.239', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_152'
      Driver info: driver.version: RemoteWebDriver
      at com.carrieriq.applications.tests.GeoFenceIT.setup(GeoFenceIT.java:25)
      Caused by: java.net.ConnectException: Failed to connect to /144.60.100.170:3128
      at com.carrieriq.applications.tests.GeoFenceIT.setup(GeoFenceIT.java:25)
      Caused by: java.net.ConnectException: Operation timed out (Connection timed out)
      at com.carrieriq.applications.tests.GeoFenceIT.setup(GeoFenceIT.java:25)

    2. In order to update the RepositoryMap.xml with the new binaries, what values should I use for hash parameter?

    Thanks

    Mark Collin
    @Ardesco
    for 1 it sounds like the windows node is unresponsive
    for 2 you can generate the hash yourself, pick either SHA1 or MD5
    If you are using a Mac on the command line type openssl sha1 <FILENAME>
    windows one used to be called FCIV, see the readme at https://github.com/Ardesco/selenium-standalone-server-plugin
    it links to the windows program
    PeteanRaduIonut
    @PeteanRaduIonut

    Thanks for the help for generating the hash.

    I've setup a grid with 1 node on windows but encountered the following error :
    Driver info: driver.version: unknown

    But if I start the node withe the following it works:
    java -Dwebdriver.chrome.driver="C:\Selenium\chromedriver.exe" -jar selenium-server-standalone-3.14.0.jar -port 5557 -role node -hub http://192.168.1.104:4444/grid/register

    Should I have a chrome driver on the node also?

    I have this issue only if I setup my own grid. If I use docker I don't have to specify the driver path when starting the node.

    Mark Collin
    @Ardesco
    Sounds like a potential bug with the node code based on what I'm seeing above
    I would suggest just using the docker container for now if it's a viable option
    or using the workaround you have identified
    PeteanRaduIonut
    @PeteanRaduIonut
    Is there a way to run on multiple browsers (firefox, chrome, IE) in a single run ?
    Thanks
    Mark Collin
    @Ardesco
    open multiple terminals and specify different browsers.
    It's specifically running only 1 browser as fast as possible so that you can isolate runs for each browser
    otherwise slower running tests (like IE) would drag out the execution time for everything else (because you aren't done till the slowest driver has finished
    scottatstchome
    @scottatstchome
    Hey gang. I am trying to understand if this project supports TestNG parallel modes.
    Mark Collin
    @Ardesco
    It uses testNG to run tests in parallel
    scottatstchome
    @scottatstchome
    I would like to add extent report to this project. But I needed to just run the project as is. I have imported into Eclipse. I deleted the standalone binaries and zips and ran mvn clean verify. Expected it to download the binaries. Actual result was nothing downloaded and there were Java errors related to using lambda expressions and the diamond operator. I refactored them and now I don't get errors but no binary download is occurring. In addition, the GoogleExampleIT.java is not running. I cloned it to GoogleExampleTest and it runs. I don't think the driver-binary-downloader-maven-plugin is being triggered. Any help is greatly appreciated.
    Shahriar
    @shahriarkamal-dsi
    hello all, for me only chrome browser is working, ie and firefox is not working , anyone can help please ?
    Shahriar
    @shahriarkamal-dsi
    Capture2.PNG
    here is for ie, it shows socket connection error, any one can have any idea ? it will be really helpful
    SawantR
    @SawantR
    java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver.
    any solution to this?
    SawantR
    @SawantR
    Can we run tests in paralles i.e .2 methods at a time without grid
    can anyone help me here?
    SawantR
    @SawantR
    Is there any way to execute through Jenkins
    Mark Collin
    @Ardesco

    for parallel run it's in the README:

    You can even specify multiple threads (you can do it on a grid as well!):

    -Dthreads=2

    Selenium expects webdriver.chrome.driver to be set, if it's not it will error if you don't provide a path to an executable. There is a maven plugin that will set it for maven if you run the tests through the command line. If you are running the tests through an IDE (IntelliJ, Eclipse, etc) you will have to set up a env variable in your IDE to cover this
    as for executing through Jenkins, it should work in the same way as running any other maven build.
    Mark Collin
    @Ardesco
    @shahriarkamal-dsi looks like the latest Firefox needs the latest GeckoDriver binary, updated code pushed
    Bidyarthi Mitra
    @bid95_gitlab
    image.png
    image.png
    image.png
    Capture.PNG
    Bidyarthi Mitra
    @bid95_gitlab
    Capture.PNG
    image.png
    image.png
    Capture.PNG
    Bidyarthi Mitra
    @bid95_gitlab
    Capture.PNG
    Capture.PNG
    Mark Collin
    @Ardesco
    that's a lot of screenshots showing that you are in the wrong directory
    looks like you want to
    D:
    cd Selenium-Maven-Template-master
    Bidyarthi Mitra
    @bid95_gitlab

    Hi @Ardesco I have done the following steps so far--extract the project -->import into eclipse -->open cmd-->cd (path)--> mvn clean verify and getting this ERROR. As well as ther is an ERROR in POM.xml that is
    x<dependency>
    <groupId>com.lazerycode.selenium</groupId>
    <artifactId>query</artifactId>
    <version>${query.version}</version>
    <scope>test</scope>
    </dependency>

    x<execution>
    <goals>
    <goal>selenium</goal>
    </goals>
    ------------------------------------------------------------------>>>
    CMD
    ------------------------------------------------------------------>>>

    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 24.403 s
    [INFO] Finished at: 2019-02-22T21:01:33+05:30
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project maven-template: Could not resolve depe
    ndencies for project com.lazerycode.selenium:maven-template:jar:1.0-SNAPSHOT: Co
    uld not find artifact com.lazerycode.selenium:query:jar:2.0.0-beta3 in central (
    https://repo.maven.apache.org/maven2) -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
    ch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please rea
    d the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
    lutionException