gpt4 book ai didi

angularjs - 等待 Protractor 与页面同步时出错 : in Protractor IE11 execution

转载 作者:搜寻专家 更新时间:2023-11-01 00:00:58 27 4
gpt4 key购买 nike

我在 IE11 中遇到错误

Error while waiting for Protractor to sync with the page: "root element (body) has no injector. this may mean it is not inside ng-app.

当我执行 Protractor 脚本时。我设置了 framework: jasmine2 但它没有帮助。但是在 Chrome 和 Firefox 中工作正常。

以下是我的代码:

// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
//config.seleniumAddress = 'http://127.0.0.1:4444/wd/hub';
maxSessions: 1,

capabilities:
{
'browserName': 'internet explorer'
},
framework: 'jasmine',
specs: ['TC_Sprint2_Case1.js'],

onPrepare: function() {
beforeEach(function() {
browser.driver.manage().window().setSize(1280, 1024);
});

jasmine.getEnv().addReporter(new HtmlReporter({
baseDirectory: 'D:/Manoj/TestReport3/',

docTitle: 'Test Case Execution Details',
docName: 'BYTestReport.html',
//Meta builder
metaDataBuilder: function(spec, descriptions, results, capabilities){
var metaData = {
description: descriptions.join('|'),
passed: results.passed(),
os: 'Windows 7',
browser: {
name: capabilities.caps_.browserName
, version: capabilities.caps_.version
}
};
if(results.items_.length > 0) {
var result = results.items_[0];
metaData.message = result.message;
metaData.trace = result.trace.stack;
}
return metaData;
} // Meta Builder ends
}));
},

最佳答案

我们可以使用 browser.driver.get('https://google.co.in'); 代替 browser.get('https://google.co.在');

之前我使用了browser.get(URL)。它导致了同步问题。当我使用 browser.driver.get(URL) 时。它解决了问题。

关于angularjs - 等待 Protractor 与页面同步时出错 : in Protractor IE11 execution,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33125494/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com