私はangularjsアプリのe2eテストに分度器を使用している初心者です。分度器のセットアップの最新バージョンがあり、Visual Studio 2015 を IDE として使用しています。
私のテストで言及されている関数 browser.get() は機能せず、「Data:,」を含むブラウザ ウィンドウしか開きません。
ここに私のconfig.jsファイルがあります:
'use strict';
exports.config = {
directConnect: true,
chromeDriver: './node_modules/protractor/selenium/chromedriver.exe',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['example_spec.js'],
framework: 'jasmine',
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
},
onPrepare: function () {
browser.driver.manage().window().maximize();
}
};
ここに私のspec.jsファイルがあります:
describe('angularjs homepage', function () {
it('should have a title', function () {
browser.get('http://angularjs.org/');
expect(browser.getTitle()).toContain('AngularJS');
});
});
私は何かを見逃していますか?助けてください!私は3日以来これを修正しようとしています。