加载第一页(conf.ts中的基本网址)
时出现以下错误量角器版本4.0.9
Error: Error while waiting for Protractor to sync with the page: "[ng:test] http://errors.angularjs.org/1.5.8/ng/test"
at C:\Users\A133928\AppData\Roaming\npm\node_modules\protractor\built\browser.js:273:23
at ManagedPromise.invokeCallback_ (C:\Users\A133928\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
at TaskQueue.execute_ (C:\Users\A133928\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
at TaskQueue.executeNext_ (C:\Users\A133928\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
at asyncRun (C:\Users\A133928\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27)
at C:\Users\A133928\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:103:7)
我也在这里遇到过类似的问题。
但问题是,我尝试了Resolution1并应用了一些等待,如下所述。即使页面完全加载后我仍然得到相同的错误。
代码:
beforeEach(() => {
loginPage.getPage();
browser.sleep(5000);
loginPage.userLogin(data.users[1].email, data.users[1].password );
browser.waitForAngular();
Conf.ts
export let config: Config = {
framework: 'jasmine',
rootElement: '.myApp',
// capabilities: { browserName: 'chrome'},
multiCapabilities: [
{
browserName: 'chrome',
chromeOptions: {
args: ['--start-maximized']
},
}],
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
seleniumPort: null,
seleniumArgs: [],
请提出任何建议。