相关疑难解决方法(0)

Selenium Webdriver可以在后台静默打开浏览器窗口吗?

我有一个运行许多测试的selenium测试套件,在每个新测试中,它打开了我打开的任何其他窗口顶部的浏览器窗口.在当地环境中工作时非常震动.有什么办法告诉selenium或操作系统(MAC)在后台打开窗口?

webdriver selenium-grid selenium-webdriver

139
推荐指数
8
解决办法
18万
查看次数

量角器在PhantomJS上运行测试

我似乎无法通过测试成功获得PhantomJS.我试图将它集成到我的项目中,但在那之后我尝试运行基本的Angular Docs示例,我遇到了同样的问题.我到目前为止的步骤:

  • npm install -g phantomjs
  • phantomjs --webdriver=9515 // ... GhostDriver - Main - 在端口9515上运行
  • protractor protractorConf.js

这是仅包含browserName的示例中的同一文件,并且seleniumAddress端口已更改:

// An example configuration file.
exports.config = {
  // The address of a running selenium server.
  seleniumAddress: 'http://localhost:9515',

  // Capabilities to be passed to the webdriver instance.
  capabilities: {
    'browserName': 'phantomjs'
  },

  // Spec patterns are relative to the current working directly when
  // protractor is called.
  specs: ['onProtractorRunner.js'],

  // Options to be passed to Jasmine-node.
  jasmineNodeOpts: {
    showColors: true,
  }
}; …
Run Code Online (Sandbox Code Playgroud)

selenium node.js phantomjs angularjs protractor

14
推荐指数
1
解决办法
2万
查看次数

任何无头浏览器的量角器?

我正在使用量角器,当我将chrome指定为browsertype时它可以工作.我正在寻找一个无头浏览器示例代码,我已经找了phantomJs但我无法运行其中任何一个.是否有另一个无头浏览器的工作样本?

headless-browser angularjs protractor

4
推荐指数
1
解决办法
3246
查看次数