【发布时间】: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