我无法在Chrome浏览器中运行示例量角器测试。
这是我的config.js文件。
exports.config = {
capabilities: {
"browserName": "chrome",
"chromeOptions": {
binary: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
args: [],
extensions: [],
}
},
seleniumAddress: 'http://localhost:4444/wd/hub',
onPrepare: function() {
var width = 1600;
var height = 1200;
browser.driver.manage().window().setSize(width, height);
},
specs: ['C:/Users/Desktop/spec.js'],
};
这是spec.js文件
describe('Guru99 Test', function() {
it('should add a Name as GURU99', function() {
browser.get('www.guru99.com');
//expect(browser.getTitle().toEqual("Meet guru99"))
element(by.xpath("//*[@href='/software-testing.html']")).click();
var guru= element(by.xpath('html/body/div[2]/div[1]/div[2]/div[2]/div/h3'));
expect(guru.getText()).toEqual('Hello change GURU99!');
browser.driver.sleep(5000);
});
});
打开chrome,输入数据;到URL,然后同样输入HTML标签片刻,然后打开URL,但什么都不做......
如何解决这个问题?
Chrome版本 - 58.0 量角器版本 - 5.1.1
提前致谢。