我正在进行量角器测试,出于某种原因我的链接被点击了两次。我假设有一些基本的东西我不知道但是无法解决。感谢
describe('Quotegen', function() {
test.browserMaximize();
test.beforeAll(function() {
test.login();
});
beforeEach(function() {
browser.ignoreSynchronization = true;
})
describe('Clicking New Quote', function() {
beforeEach(function(){
// **** this click function is being run twice ****
element(by.linkText('New Quote')).click();
});
it('should take you to New Quote page', function() {
expect(browser.getCurrentUrl()).toMatch('/site/');
});
});
});
新引用HTML:
<li class="nav-content"><a href="/site/" target = "_self">
<i class="fa fa-bolt"></i> New Quote</a>
</li>