Get help with testing, discuss unit testing strategies etc.


Post by nmorado »

Hi,

Whenever i run selenium, I am getting the below error. AM i missing anything?

Thanks

C:\Workfiles\tools\siesta-1.0.7-standard\bin>selenium.bat https://localhost:8080/bpcorpact/gui-test/siesta/index.html

C:\Workfiles\tools\siesta-1.0.7-standard\bin>set DIR=C:\Workfiles\tools\siesta-1.0.7-standard\bin\

C:\Workfiles\tools\siesta-1.0.7-standard\bin>java -cp "C:\Workfiles\tools\siesta-1.0.7-standard\bin\binary\selenium-server-standalone-2.15.0.jar;C:\Wo
rkfiles\tools\siesta-1.0.7-standard\bin\binary\js.jar" org.mozilla.javascript.tools.shell.Main "C:\Workfiles\tools\siesta-1.0.7-standard\bin\selenium-
launcher.js" "C:\Workfiles\tools\siesta-1.0.7-standard\bin\" https://localhost:8080/bpcorpact/gui-test/siesta/index.html
Usage: selenium url [OPTIONS]
The `url` should point to your `tests/index.html` file

Options (all are optional):
--browser browsername      - should be exactly one of the "firefoxproxy / googlechrome / iexploreproxy / safariproxy / opera"
                             this option can be repeated several times
                             default value is *, meaning all available browsers
--host localhost           - host for selenium server (default value is "localhost")
--port 4444                - port for selenium server (default value is 4444)
--filter filter_value      - a text of regexp to filter the urls of tests
--verbose                  - enable diagnostic messages
--sequential               - enable sequential execution mode
--report-format            - create a report for each browser after the test suite execution
                             recognizable formats are: "JSON, JUnit"
--report-file-prefix       - required when `report-format` is provided.
                             Specifies the initial part of file name to save the report to.
                             The browser name will be used as the second part, extension will be preserved.
                             For example, specifying: --report-file-prefix=report_.json will save the reports to:
                             report_firefoxproxy.json, report_iexploreproxy.json, etc
--report-file              - Alias for `--report-file-prefix`

Post by nickolay »

Do you use some non-standard shell (power-shell etc)? selenium.bat contains @echo off, but I see the log of launched commands.

Post by nmorado »

I turned it on. Same result when it is off.

Post by nickolay »

Oh, looks like a regression in windows launcher - try to remove the quotes around of the "%DIR%":
java -cp "%DIR%binary\selenium-server-standalone-2.15.0.jar;%DIR%binary\js.jar" org.mozilla.javascript.tools.shell.Main "%DIR%selenium-launcher.js" %DIR% %1 %2 %3 %4 %5 %6 %7 %8 %9

Post by nmorado »

It ran without the initial issue - but it looks like just hanged from thereon. Is it supposed to complete? Any reports that get generated?

The documentation seems not elaborate on this.
C:\Workfiles\tools\siesta-1.0.7-standard\bin>java -cp "C:\Workfiles\tools\siesta-1.0.7-standard\bin\binary\selenium-server-standalone-2.15.0.jar;C:\Wo
rkfiles\tools\siesta-1.0.7-standard\bin\binary\js.jar" org.mozilla.javascript.tools.shell.Main "C:\Workfiles\tools\siesta-1.0.7-standard\bin\selenium-
launcher.js" C:\Workfiles\tools\siesta-1.0.7-standard\bin\ https://localhost:8080/bpcorpact/gui-test/siesta/index.html

Post by nickolay »

Do you see browser windows opening? It should open several browser windows and report the results in the console output. Sometime selenium hangs though (already reported to selenium team) try to close all other browser windows before launching. Also try launching only single browser with "--browser" option.

Post by nmorado »

I did close all browsers. I also run it for iexploreproxy only.

I see that a new java process gets spawned (from selenium server i assume).

But still no browser opens nor any iexplore process gets spawned.

Does selenium requires an admin privilege to run?

Post by nickolay »

Yes, IIRC selenium requires the write permission in the directory with the "standalone-server.jar" flle. What is your IE version and Windows version btw? There was an issue with Selenium for XP / IE8 combination IIRC.

Post by nmorado »

I have write permission into the directory where selenium jar lives.

XP / IE 8.0.6001.18702CO

Post by nmorado »

Tried with firefoxproxy with same result

Post Reply