0

I want to run protractor tests on a webserver integration platform without gui based on redhat linux. The tests will be executed whenever the webserver software will be deployed. I use firefox and geckodriver. The call chain is

  • protractor calls
  • firefox on
  • Xvfb calls
  • (local) Webserver
  • and backwards to the caller.

I get Jasmine timeouts when starting Protractor with Xvfb.

My environment:

  • node: v12.14.1
  • npm: 6.14.2
  • Xvfb: ?, installed, callable
  • xvfb-run: ?, installed, callable

My start scripts:

Selenium:

java -jar -Dwebdriver.chrome.driver=/pathx/geckodriver-v0.26.0 /pathy/selenium-server-standalone-3.141.59.jar &

This is essentially what 'webdriver-manager start' does, but I cannot need the update ahead.

Xvfb:

xvfb-run --auto-servernum --server-args='-screen 0 1920x1200x24' -e xvfb.err firefox &

Protractor:

DISPLAY=:99 protractor --verbose --troubleshoot --logLevel=DEBUG protractor.conf.js

All I get is

[15:00:59] D/launcher - Running with --troubleshoot
[15:00:59] D/launcher - Protractor version: 5.4.3
[15:00:59] D/launcher - Your base url for tests is undefined
[15:00:59] I/launcher - Running 1 instances of WebDriver
[15:00:59] I/direct - Using FirefoxDriver directly...
[15:01:00] D/runner - WebDriver session successfully started with capabilities C                              apabilities {
  map_: Map {
    'acceptInsecureCerts' => false,
    'browserName' => 'firefox',
    'browserVersion' => '60.9.0',
    'moz:accessibilityChecks' => false,
    'moz:geckodriverVersion' => '0.26.0',
    'moz:headless' => false,
    'moz:processID' => 32246,
    'moz:profile' => '/tmp/rust_mozprofileAz14ww',
    'moz:useNonSpecCompliantPointerOrigin' => false,
    'moz:webdriverClick' => true,
    'pageLoadStrategy' => 'normal',
    'platformName' => 'linux',
    'platformVersion' => '3.10.0-957.el7.x86_64',
    'rotatable' => false,
    'timeouts' => { implicit: 0, pageLoad: 300000, script: 30000 }
  }
}
[15:01:00] D/runner - Running with spec files /home/xgadvls/az-uss/frontend/e2e/                              src/specs/login/login-spec.ts,/home/xgadvls/az-uss/frontend/e2e/src/specs/logout                              /logout-spec.ts
Started
undefined
F(node:32231) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
FA Jasmine spec timed out. Resetting the WebDriver Control Flow.
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
FA Jasmine spec timed out. Resetting the WebDriver Control Flow.


Failures:
1) Anmeldung Anmeldedate werden eingegeben
  Message:
    Failed: WebDriverError
  Stack:
    Error: Failed: WebDriverError
        at /home/xgadvls/az-uss/node_modules/jasminewd2/index.js:64:48
...

How can I get a webdriver error when I haven't got it in my call chain?! What am I doing wrong? Can anybody help?

Vobson
  • 1
  • Meanwhile I changed the protractor config from headless to -headless. The trace contains now a `'moz:headless' => true,` , the timeouts remain the same. Does anybody know where I can find additional information abaout what happens in the different systems? – Vobson Mar 25 '20 at 12:36

1 Answers1

0

The problem was caused by an invalid certificate.

My way to the solution may be interesting.

I renamed the geckodriver-v0.26.0 (or so) to geckodriver.bin. I made a script with the original geckodriver name and called in that script the bin version with -vv argument (very verbose) and redirected the output into a file (>myfile). It is important to pass all parameters ($@).

The next test informed me in the log file about the invalid certificate. This can be fixed by a parameter AcceptInsecureCerts for firefox. (I guess chrome as well)

Here we go.

I hope this helps anybody.

Vobson
  • 1