【发布时间】:2019-12-18 11:51:27
【问题描述】:
我有 2 个规范需要在非并行模式下运行,1 个规范应该在 chrome 中运行,其他在 firefox 中。
这是我的 config.js
exports.config = {
framework: 'jasmine',
//Potractor will run tests in parallel against each set of capabilities.
//Please note that if multiCapabilities is defined, the runner will ignore the capabilities configuration
multiCapabilities: [{
'name': 'test1',
browserName: 'firefox',
'moz:firefoxOptions': {
args: ['--verbose'],
binary: 'C:/Program Files/Mozilla Firefox/firefox.exe',
specs: ['src/com/sam/scriptjs/iframes.spec.js']
},
}, {
'name': 'test2',
browserName: 'chrome',
specs: ['src/com/sam/scriptjs/rightclickme.spec.js']
}],
seleniumAddress: 'http://localhost:4444/wd/hub'
}
这是我的 chrometest.spec.js describe('chrome desc', function() {
it('Navigae to the site using chrome', function() {
browser.driver.get(browser.baseUrl);
expect(browser.getTitle()).toEqual('Super Calculator');
});
});
这是我的 firefoxtest.spec.js。请让我知道是否有办法,我已经检查了类似的How to, so to speak, restart or close browser after every protractor -spec test,但这不足以解决我的查询。谢谢。
describe('firefox desc', function() {
it('Navigae to the site using firefox', function() {
browser.driver.get(browser.baseUrl);
expect(browser.getTitle()).toEqual('Super Calculator');
});
});
【问题讨论】:
标签: jasmine protractor