【发布时间】:2014-04-07 03:29:39
【问题描述】:
我正在使用 webdriver(http://webdriver.io/)、独立的 selenium、mocha 来编写我的测试用例。测试用例特定于 chrome,所以我使用的是 chromedriver。
在启动时,我希望禁用“touch-events”和“touch-optimized-ui”标志,否则我的测试用例将失败。
每次 chromedriver 启动浏览器时,它都会以默认选项启动。 有人可以为此提供解决方案吗?可以在下面的代码中添加什么来禁用这些标志?或者其他解决方案?
示例代码:
var webdriverjs = require('./webdriverjs/index'),
assert = require('assert');
describe('my webdriverjs tests', function(){
this.timeout(99999999);
var client = {};
before(function(done){
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'chrome'} });
client.init(done);
});
it('sample test',function(done) {
client
.url('http://localhost:3030/subset/index')
.call(done)
});
after(function(done) {
client.end(done);
});
});
【问题讨论】:
标签: javascript node.js selenium-webdriver selenium-chromedriver