量角器点击按钮两次

时间:2014-10-03 00:43:01

标签: angularjs protractor

我正在进行量角器测试,出于某种原因我的链接被点击了两次。我假设有一些基本的东西我不知道但是无法解决。感谢

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>

0 个答案:

没有答案