Accepting SSL certs firefox from command line

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Accepting SSL certs firefox from command line

Léon DURAND
Hello,
I use an html runner to run test suites exported from selenium IDE and I cannot resolve firefox to accept insecure ssl certificates.
I use :
firefox nightly 55
geckodriver 0.17
selenese runner 3.6.0

The command I use is the following :
java -jar selenese-runner.jar --firefox "C:/Program Files (x86)/Nightly/firefox.exe" --html-result TestCase/results TestCase/TestVitesse

My test case is named "TestVitesse"

To set the capability of firefox "acceptInsecureCerts" to true I tried the following commands:
--cli-args "--acceptInsecureCerts=true"
OR --cli-args "acceptInsecureCerts=true"
OR  -D org.openqa.selenium.firefox.FirefoxDriver.desiredCapabilities.acceptInsecureCerts=true

The console log for the command :
java -jar selenese-runner.jar --firefox "C:/Program Files (x86)/Nightly/firefox.exe" -D org.openqa.selenium.firefox.FirefoxDriver.desiredCapabilities.acceptInsecureCerts=true --html-result TestCase/results TestCase/TestVitesse

 is the following:

[2017-06-15 11:34:19.499 +02:00] [INFO] Start: Selenese Runner 3.6.0
1497519265468   geckodriver     INFO    Listening on 127.0.0.1:35399
1497519265801   geckodriver::marionette INFO    Starting browser C:/Program Files (x86)/Nightly/firefox.exe with args ["-marionette"]
Unable to read VR Path Registry from C:\Users\ldurand\AppData\Local\openvr\openvrpaths.vrpath
[GPU 8992] WARNING: pipe error: 109: file c:/builds/moz2_slave/m-cen-w32-ntly-000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
Unable to read VR Path Registry from C:\Users\ldurand\AppData\Local\openvr\openvrpaths.vrpath
[Child 12800] WARNING: pipe error: 109: file c:/builds/moz2_slave/m-cen-w32-ntly-000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
1497519268288   Marionette      INFO    Listening on port 62624
1497519269017   Marionette      DEBUG   loaded listener.js
[2017-06-15 11:34:29.052 +02:00] [INFO] Detected dialect: W3C
[2017-06-15 11:34:29.062 +02:00] [INFO] Initial window size: system default
[2017-06-15 11:34:29.062 +02:00] [INFO] Initialized: FirefoxDriver
[2017-06-15 11:34:29.089 +02:00] [INFO] HTML result directory: TestCase/results
[2017-06-15 11:34:29.098 +02:00] [INFO] Timeout: 30000 ms
[2017-06-15 11:34:29.514 +02:00] [INFO] Start: TestSuite[TestVitesse] (TestCase\TestVitesse)
[2017-06-15 11:34:29.533 +02:00] [INFO] Existing driver found.
[2017-06-15 11:34:29.555 +02:00] [INFO] Current speed: 0 ms/command
[2017-06-15 11:34:29.555 +02:00] [INFO] Start: TestCase[htmlVSjava] (TestCase\htmlVSjava.html)
[2017-06-15 11:34:29.556 +02:00] [INFO] baseURL: https://web/guest/home
[2017-06-15 11:34:29.569 +02:00] [INFO] <1> Command#1: open("https://web/guest/home")
1497519269594   Marionette      DEBUG   Received DOM event "beforeunload" for "about:blank"
1497519269685   Marionette      DEBUG   Received DOM event "beforeunload" for "about:blank"
1497519269686   Marionette      DEBUG   Received DOM event "pagehide" for "about:blank"
1497519269687   Marionette      DEBUG   Received DOM event "unload" for "about:blank"
1497519269737   Marionette      DEBUG   Received DOM event "DOMContentLoaded" for "about:certerror?e=nssBadCert&u=https%3A//%3A23310/web/guest/home&c=UTF-8&f=regular&d=%3A23310%20utilise%20un%20certificat%20de%20s%C3%A9curit%C3%A9%20invalide.%0A%0ALe%20certificat%20n%E2%80%99est%20pas%20s%C3%BBr%20car%20il%20est%20auto-sign%C3%A9.%0ALe%20certificat%20n%E2%80%99est%20pas%20valide%20pour%20le%20nom%20.%0A%0ACode%20d%E2%80%99erreur%C2%A0%3A%20%3Ca%20id%3D%22errorCode%22%20title%3D%22SEC_ERROR_UNKNOWN_ISSUER%22%3ESEC_ERROR_UNKNOWN_ISSUER%3C/a%3E%0A"
[2017-06-15 11:34:29.868 +02:00] [ERROR] Command#1: open("https:///web/guest/home") => [Failure:  / Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' / System info: host: 'LFR021829', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_131' / Driver info: org.openqa.selenium.firefox.FirefoxDriver / Capabilities [{moz:profile=C:\Users\ldurand\AppData\Local\Temp\rust_mozprofile.ibUAfR8HxG1Z, rotatable=false, timeouts={implicit=0.0, pageLoad=300000.0, script=30000.0}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=55.0a1, platformVersion=10.0, moz:processID=5512.0, browserName=firefox, javascriptEnabled=true, platformName=windows_nt}] / Session ID: 574659e4-20ab-4a3f-aed2-cd99a0221766] URL: [https://web/guest/home] / Title: [Connexion non s▒curis▒e]
[2017-06-15 11:34:29.870 +02:00] [INFO] End(0,314sec): TestCase[htmlVSjava] (TestCase\htmlVSjava.html)
[2017-06-15 11:34:29.870 +02:00] [INFO] Start: TestCase[E002_02_1] (TestCase\E002_02_1.html)
[2017-06-15 11:34:29.870 +02:00] [INFO] baseURL: https://web/guest/home
[2017-06-15 11:34:29.870 +02:00] [INFO] <1> Command#1: open("https://web/guest/les-actualites")
1497519269876   Marionette      DEBUG   Received DOM event "beforeunload" for "about:certerror?e=nssBadCert&u=https%3A//%3A23310/web/guest/home&c=UTF-8&f=regular&d=%3A23310%20utilise%20un%20certificat%20de%20s%C3%A9curit%C3%A9%20invalide.%0A%0ALe%20certificat%20n%E2%80%99est%20pas%20s%C3%BBr%20car%20il%20est%20auto-sign%C3%A9.%0ALe%20certificat%20n%E2%80%99est%20pas%20valide%20pour%20le%20nom%20.%0A%0ACode%20d%E2%80%99erreur%C2%A0%3A%20%3Ca%20id%3D%22errorCode%22%20title%3D%22SEC_ERROR_UNKNOWN_ISSUER%22%3ESEC_ERROR_UNKNOWN_ISSUER%3C/a%3E%0A"
1497519269941   Marionette      DEBUG   Received DOM event "beforeunload" for "about:certerror?e=nssBadCert&u=https%3A//%3A23310/web/guest/home&c=UTF-8&f=regular&d=%3A23310%20utilise%20un%20certificat%20de%20s%C3%A9curit%C3%A9%20invalide.%0A%0ALe%20certificat%20n%E2%80%99est%20pas%20s%C3%BBr%20car%20il%20est%20auto-sign%C3%A9.%0ALe%20certificat%20n%E2%80%99est%20pas%20valide%20pour%20le%20nom%20.%0A%0ACode%20d%E2%80%99erreur%C2%A0%3A%20%3Ca%20id%3D%22errorCode%22%20title%3D%22SEC_ERROR_UNKNOWN_ISSUER%22%3ESEC_ERROR_UNKNOWN_ISSUER%3C/a%3E%0A"
1497519269943   Marionette      DEBUG   Received DOM event "pagehide" for "about:certerror?e=nssBadCert&u=https%3A//%3A23310/web/guest/home&c=UTF-8&f=regular&d=%3A23310%20utilise%20un%20certificat%20de%20s%C3%A9curit%C3%A9%20invalide.%0A%0ALe%20certificat%20n%E2%80%99est%20pas%20s%C3%BBr%20car%20il%20est%20auto-sign%C3%A9.%0ALe%20certificat%20n%E2%80%99est%20pas%20valide%20pour%20le%20nom%20.%0A%0ACode%20d%E2%80%99erreur%C2%A0%3A%20%3Ca%20id%3D%22errorCode%22%20title%3D%22SEC_ERROR_UNKNOWN_ISSUER%22%3ESEC_ERROR_UNKNOWN_ISSUER%3C/a%3E%0A"
1497519269943   Marionette      DEBUG   Received DOM event "unload" for "about:certerror?e=nssBadCert&u=https%3A//%3A23310/web/guest/home&c=UTF-8&f=regular&d=%3A23310%20utilise%20un%20certificat%20de%20s%C3%A9curit%C3%A9%20invalide.%0A%0ALe%20certificat%20n%E2%80%99est%20pas%20s%C3%BBr%20car%20il%20est%20auto-sign%C3%A9.%0ALe%20certificat%20n%E2%80%99est%20pas%20valide%20pour%20le%20nom%20.%0A%0ACode%20d%E2%80%99erreur%C2%A0%3A%20%3Ca%20id%3D%22errorCode%22%20title%3D%22SEC_ERROR_UNKNOWN_ISSUER%22%3ESEC_ERROR_UNKNOWN_ISSUER%3C/a%3E%0A"
1497519269972   Marionette      DEBUG   Received DOM event "DOMContentLoaded" for "about:certerror?e=nssBadCert&u=https%3A//%3A23310/web/guest/les-actualites&c=UTF-8&f=regular&d=%3A23310%20utilise%20un%20certificat%20de%20s%C3%A9curit%C3%A9%20invalide.%0A%0ALe%20certificat%20n%E2%80%99est%20pas%20s%C3%BBr%20car%20il%20est%20auto-sign%C3%A9.%0ALe%20certificat%20n%E2%80%99est%20pas%20valide%20pour%20le%20nom%20.%0A%0ACode%20d%E2%80%99erreur%C2%A0%3A%20%3Ca%20id%3D%22errorCode%22%20title%3D%22SEC_ERROR_UNKNOWN_ISSUER%22%3ESEC_ERROR_UNKNOWN_ISSUER%3C/a%3E%0A"
[2017-06-15 11:34:30.048 +02:00] [ERROR] Command#1: open("https:/:23310/web/guest/les-actualites") => [Failure:  / Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' / System info: host: 'LFR021829', ip: '10.72.106.97', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_131' / Driver info: org.openqa.selenium.firefox.FirefoxDriver / Capabilities [{moz:profile=C:\Users\ldurand\AppData\Local\Temp\rust_mozprofile.ibUAfR8HxG1Z, rotatable=false, timeouts={implicit=0.0, pageLoad=300000.0, script=30000.0}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=55.0a1, platformVersion=10.0, moz:processID=5512.0, browserName=firefox, javascriptEnabled=true, platformName=windows_nt}] / Session ID: 574659e4-20ab-4a3f-aed2-cd99a0221766] URL: [https://web/guest/les-actualites] / Title: [Connexion non s▒curis▒e]
[2017-06-15 11:34:30.049 +02:00] [INFO] End(0,179sec): TestCase[E002_02_1] (TestCase\E002_02_1.html)
[2017-06-15 11:34:30.049 +02:00] [INFO] End(0,000sec): TestSuite[TestVitesse] (TestCase\TestVitesse)
[2017-06-15 11:34:30.130 +02:00] [INFO] Generated HTML result: TestCase\results\TEST-TestVitesse.html
[2017-06-15 11:34:30.135 +02:00] [INFO] Generated index of HTML results: TestCase\results\index.html
[2017-06-15 11:34:30.135 +02:00] [INFO] Exit code: 3
1497519270141   Marionette      INFO    New connections will no longer be accepted
Unable to read VR Path Registry from C:\Users\ldurand\AppData\Local\openvr\openvrpaths.vrpath
JavaScript error: resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/devtools-browser.js, line 861: TypeError: DebuggerServer.removeContentServerScript is not a function
[GFX1-]: Receive IPC close with reason=AbnormalShutdown
[2017-06-15 11:34:30.768 +02:00] [INFO] Quit: FirefoxDriver

I would like to know how to tell Selenium, via the command line, to accept Insecure Certificates for firefox.
Thank you in advance,

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7404669a-fe5a-4e53-bbb0-fec26779c290%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.