slimerjs icon indicating copy to clipboard operation
slimerjs copied to clipboard

SlimerJS 0.10.3 on Windows only support `-w` but not `--webdriver` option

Open spex66 opened this issue 9 years ago • 2 comments

versions

  • SlimerJS: 0.10.3
  • Firefox: 52.0.2 32bit
  • Operating system: Win10 64bit
  • IPython 5.1.0 (Python 2.7.11 |Anaconda 2.4.1 (64-bit))
  • selenium-3.3.3 (updated issue to reference latest Selenium version)

Steps to reproduce the issue

CMD prompt

>slimerjs.bat --webdriver
unknown option --webdriver

Or calling the parameterized firefox.exe:

>"C:\Progs\Mozilla Firefox\firefox.exe"  -app "C:\dev\slimerjs-0.10.3\application.ini" -profile C:\Users\me\AppData\Local\Temp\slimerjs-132481100029753 -attach-console -no-remote --webdriver=31415

JavaScript strict warning: resource://gre/modules/TelemetryEnvironment.jsm, line 1131: ReferenceError: reference to undefined property "nsIShellService"
unknown option --webdriver=31415

Or running Python Selenium which break as well, because of:

  • Python27-64bit\Lib\site-packages\selenium\webdriver\phantomjs\service.py
    def command_line_args(self):
        return self.service_args + ["--webdriver=%d" % self.port]

Actual results:

Start of SlimerJS stops in all three scenarios.

Is there any chance that I called it in a wrong way?!

Expected results:

Support of --webdriver=<port>, which would not break Python Selenium PhantomJS usage.

Switching from --webdriver=<port> to -w <port> works fine for all three scenarios.

>slimerjs.bat -w

or
>slimerjs.bat -w 31415

or

>"C:\Progs\Mozilla Firefox\firefox.exe"  -app "C:\dev\slimerjs-0.10.3\application.ini" -profile C:\Users\me\AppData\Local\Temp\slimerjs-132481100029753 -attach-console -no-remote -w 31415

or patched Python27-64bit\Lib\site-packages\selenium\webdriver\phantomjs\service.py

    def command_line_args(self):
        # xxx pa 170412: commandline not working with --webdriver 'unknown option'
        # return self.service_args + ["--webdriver=%d" % self.port]
        return self.service_args + ["-w", "%d" % self.port]

spex66 avatar Apr 13 '17 08:04 spex66

Same here - using older Firefox version 51 seems to work

olee avatar Jul 07 '17 18:07 olee

Did you try with a single dash as indicated into the documentation ? -webdriver instead of --webdriver

laurentj avatar Oct 04 '17 08:10 laurentj