Angularjs 量角器选择器和事件问题
我正在尝试使用量角器为我的应用程序创建一些测试 browser.get正常,当加载我的页面并启动我的应用程序时,第一个测试正在运行Angularjs 量角器选择器和事件问题,angularjs,protractor,angularjs-e2e,Angularjs,Protractor,Angularjs E2e,我正在尝试使用量角器为我的应用程序创建一些测试 browser.get正常,当加载我的页面并启动我的应用程序时,第一个测试正在运行 it('should go to the where and when page', function() { var nextButton = element(by.id('cg_btnValidationQuoi')); expect(nextButton.getText()).toBe('Suivant'); } 这会引起时间的推移 it(
it('should go to the where and when page', function() {
var nextButton = element(by.id('cg_btnValidationQuoi'));
expect(nextButton.getText()).toBe('Suivant');
}
这会引起时间的推移
it('should go to the where and when page', function() {
var nextButton = element(by.id('cg_btnValidationQuoi'));
nextButton.click()
}
原因错误:使用定位器By.idcg\u btnValidationQuoi未找到任何元素
it('should go to the where and when page', function() {
var nextButton = element(by.id('cg_btnValidationQuoi'));
expect(nextButton.getInnerHtml()).toBe('Suivant');
}
原因:
Message:
Expected '
Suivant
' to be 'Suivant'.
它听起来像任何人都知道的东西吗?托比检查它是否是完全相同的对象字符串。我建议使用toEqual,看看它是否有效 你用哪种量角器版本?这确实很奇怪,我们显然遗漏了一些东西。你能给我们更多的代码/信息吗?我不能粘贴你的原始代码,但我写了一个类似的副本!在这里找到它: