【问题标题】:IE11 protractor selenium, unable to create new remoteIE11量角器硒,无法创建新的遥控器
【发布时间】:2017-02-22 17:14:24
【问题描述】:

期待,protractor conf.js 通过 Internet Explorer 11 打开 Angular 网站

在我输入量角器conf.js 后,它会打开 ie11,但我没有打开 URL,而是在我的 example_spec.js 'http://www.angularjs.org' 中看到 ie11 正在打开'http://localhost:XXXXX/'(xxxx 是数字)并在页面中显示“这是 WebDriver 服务器的初始起始页面”,我希望 ie11 以“http://www.angularjs.org”打开

错误报告

    E/Launcher - Unable to create new remote session, desired capabilities = capabilities [(count=1, browserName=internet explorer, version=11, platform='Any')], required capabilities= Capabilities [()].

`Node Version`: `v6.9.5` 

`Protractor Version`: `5.1.1`

`Angular Version`: ``

`Browser(s)`: `IE11`: 

`Operating System and Version`:  `Windows 7, os.arch: 'amd64',, os.version: 6.1`

`Your protractor configuration file;`
`exports.config` = `{`
seleniumAddress`: 'http://localhost:4444/wd/hub',
seleniumArgs`: `['Dwebdriver.ie.driver=c:\Users\12345\Appdata\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\IEDriverServer3.1.0.exe']`,
`capabilities`: `{`
`'browserName'` : `'internet explorer'`,
`'platform' : 'Any'`,
`'version'` : `'11'`
`},`
`framework`: `'jasmine'`,
`specs`: `['example_spec.js]`,
`jasmineNodeOpts`: `{`
`defaultTimeInterval`: `30000`
`}`
`};`

A relevant example test
`describe('angularjs home page',function(){`
`it('should greet the named user',function (){`
`browser.get('http://www.angularjs.org');`
`element(by.model('yourName')).sendKeys('Julie');`
`var greeting=element(by.binding('yourName'));`
`expect(greeting.getText().toEqual('Hello Julie!');`
`});`
`});`

运行测试的输出 它打开 ie11 但里面的 url 是 'http://localhost:XXXXX/' ,页面中的内容是 ' '这是 WebDriver 服务器的初始起始页'

重现错误的步骤 运行 webdriver-manager start 然后到 conf 文件所在的路径输入'protractor conf.js'

您运行测试的 URL(如果相关) 'http://www.angularjs.org'

【问题讨论】:

    标签: angularjs selenium protractor internet-explorer-11


    【解决方案1】:

    根据设计,IE 在导航到您的规范的browser.get() 中提供的 url 之前会打开一个默认页面。

    是的,IE 设置很麻烦,在某些缺少的配置上,您会看到 Unable to create new remote session 和浏览器仅显示默认页面。

    这可能有多种原因。我建议尝试以下所有建议并参考已经存在的问题

    • 为每个区域“启用保护模式”
    • 禁用 IE 调试器
    • 缩放设置为 100%

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-26
      • 1970-01-01
      相关资源
      最近更新 更多