ฉันได้รับข้อผิดพลาดซึ่งอ่านว่า:
"Error while waiting for Protractor to synce with the page: "Cannot read property '$$testability' of undefined"
ด้านล่างคือการทดสอบของฉัน
describe('On the MyMoments page', function(){
beforeEach(function() {
var editLocationText = 'Location';
browser.driver.get('http://192.168.0.6:8100/#/page1/myMoments');
});
it('The edit button should work', function() {
browser.driver.get('http://192.168.0.6:8100/#/page1/myMoments').then(function() {
// browser.waitForAngular();
browser.getCurrentUrl().then(function(url) {
});
});
});
});
นี่คือไฟล์ปรับแต่งของฉัน:
exports.config = {
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
args: ['--disable-web-security']
}
},
baseUrl: 'http://192.168.0.6:8100',
specs: [
'*.test.js'
],
jasmineNodeOpts: {
isVerbose: true,
}
};
ฉันไม่คิดว่านี่เกี่ยวข้องกับการทดสอบของฉันเนื่องจากการทดสอบของฉันง่ายมาก มีใครเคยประสบปัญหานี้มาก่อนหรือไม่? ฉันติดขัดนิดหน่อย
ขอบคุณ.
แก้ไข:
ปรับลดรุ่น Protractor ของฉันเป็น 4.0.14 เพื่อแก้ไขข้อผิดพลาดนี้ ตอนนี้ฉันได้รับ:
"Failed: Error while waiting for Protractor to sync with the page: "[ng:test] no injector found for element argument to getTestability/http://errors.angularjs.org/1.5.3/ng/test"
หากใครรู้ว่าสิ่งนี้คืออะไรหรือจะแก้ไขปัญหานี้ได้อย่างไร โปรดแจ้งให้เราทราบ!
ขอบคุณ.