【发布时间】:2020-03-24 14:40:44
【问题描述】:
我想在没有基于 redhat linux 的 gui 的网络服务器集成平台上运行量角器测试。只要部署网络服务器软件,就会执行测试。我使用 Firefox 和 geckodriver。 调用链是
- 量角器调用
- 火狐打开
- Xvfb 调用
- (本地)网络服务器
- 并返回给调用者。
使用 Xvfb 启动 Protractor 时出现 Jasmine 超时。
我的环境:
- 节点:v12.14.1
- npm: 6.14.2
- Xvfb:?,已安装,可调用
- xvfb-run: ?,已安装,可调用
我的启动脚本:
硒:
java -jar -Dwebdriver.chrome.driver=/pathx/geckodriver-v0.26.0 /pathy/selenium-server-standalone-3.141.59.jar &
这基本上是“webdriver-manager start”所做的,但我不需要提前更新。
Xvfb:
xvfb-run --auto-servernum --server-args='-screen 0 1920x1200x24' -e xvfb.err firefox &
量角器:
DISPLAY=:99 protractor --verbose --troubleshoot --logLevel=DEBUG protractor.conf.js
我得到的只是
[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
...
如果我的调用链中没有 webdriver 错误,我怎么能得到它?!我究竟做错了什么?有人可以帮忙吗?
【问题讨论】:
-
同时我将量角器配置从无头更改为无头。跟踪现在包含
'moz:headless' => true,,超时保持不变。有人知道我在哪里可以找到有关不同系统中发生的情况的其他信息吗?
标签: selenium protractor timeout headless xvfb