Misaz Misaz - 2 years ago 242
Java Question

Selenium HTML Runner fails with permission denied

I have Firefox 45.9.0, Selnium 3.4 Html Runner and geckodriver 0.18 installed on Raspberry Pi 3. I am running it like

java -jar selenium-html-runner-3.4.0.jar -htmlSuite "*firefox" "http://localhost:88" /home/michal/abc/suite.html /home/michal/abc


but some commands like
clickAndWait
or
type
fails with permission denied error in result file.

com.thoughtworks.selenium.SeleniumException: Error: Permission denied to access property '__webdriverAlerts'


output printed to stdout

Multi-window mode is longer used as an option and will be ignored.
1500909971572 geckodriver INFO geckodriver 0.18.0
1500909971595 geckodriver INFO Listening on 127.0.0.1:25370
1500909972680 geckodriver::marionette INFO Starting browser /usr/bin/firefox with args ["-marionette"]
Čvc 24, 2017 5:26:22 ODP. org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
2017-07-24 17:26:23.090:INFO::main: Logging initialized @13587ms to org.seleniumhq.jetty9.util.log.StdErrLog
2017-07-24 17:26:23.289:INFO:osjs.Server:main: jetty-9.4.z-SNAPSHOT
2017-07-24 17:26:23.371:INFO:osjsh.ContextHandler:main: Started o.s.j.s.h.ContextHandler@5c8d3f{/tests,null,AVAILABLE}
2017-07-24 17:26:23.415:INFO:osjs.AbstractConnector:main: Started ServerConnector@1c1b556{HTTP/1.1,[http/1.1]}{0.0.0.0:15196}
2017-07-24 17:26:23.417:INFO:osjs.Server:main: Started @13915ms
Čvc 24, 2017 5:26:25 ODP. org.openqa.selenium.server.htmlrunner.CoreTestCase run
INFO: |open | http://localhost:88/ | |
Čvc 24, 2017 5:26:26 ODP. org.openqa.selenium.server.htmlrunner.CoreTestCase run
INFO: |selectWindow | null | |
Čvc 24, 2017 5:26:26 ODP. org.openqa.selenium.server.htmlrunner.CoreTestCase run
INFO: |clickAndWait | link=Blog | |
test.html
<a href="test.html">test</a></td></tr>
</tbody></table>
2017-07-24 17:26:27.414:INFO:osjs.AbstractConnector:main: Stopped ServerConnector@1c1b556{HTTP/1.1,[http/1.1]}{0.0.0.0:15196}
2017-07-24 17:26:27.416:INFO:osjsh.ContextHandler:main: Stopped o.s.j.s.h.ContextHandler@5c8d3f{/tests,null,UNAVAILABLE}
Čvc 24, 2017 5:26:27 ODP. org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: '404' -> incorrect JSON status mapping for 'unknown error' (500 expected)
Čvc 24, 2017 5:26:29 ODP. org.openqa.selenium.os.UnixProcess destroy
INFO: Command failed to close cleanly. Destroying forcefully (v2). [/home/michal/selenium/geckodriver, --port=25370, -b, /usr/bin/firefox][ {}]
Čvc 24, 2017 5:26:30 ODP. org.openqa.selenium.os.UnixProcess destroy
SEVERE: Unable to kill process with PID 4786
Čvc 24, 2017 5:26:30 ODP. org.openqa.selenium.server.htmlrunner.HTMLLauncher mainInt
WARNING: Test of browser failed: *firefox
org.openqa.selenium.WebDriverException: quit
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'raspberrypi', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'arm', os.version: '4.9.35-v7+', java.version: '1.8.0_65'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, appBuildId=20170419042421, version=45.9.0, platform=LINUX, proxy=Proxy(), specificationLevel=1, acceptSslCerts=false, browserVersion=45.9.0, platformVersion=4.9.35-v7+, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=Firefox, takesScreenshot=true, takesElementScreenshot=true, javascriptEnabled=true, platformName=Linux, device=desktop}]
Session ID: 19afb854-e7b4-4e84-807e-62a9c6ece5f4
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:422)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
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.execute(RemoteWebDriver.java:694)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:533)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:139)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.mainInt(HTMLLauncher.java:245)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.main(HTMLLauncher.java:273)


On the geckodriver github page https://github.com/mozilla/geckodriver/releases i found that geckodriver 0.18 is recommended to use with Firefox 53+ but when i choose older geckodriver the output result is the same.

Tests based only on open and verify commands works. How can I get working all tests?

Answer Source

Change selenium to 2.53 version because You really ff version is 45 And dont work on selenium v3.4 :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download