How to avoid double click on different button?

前端 未结 3 2029
粉色の甜心
粉色の甜心 2021-01-29 07:25

My problem is not a double click on same button but on 2 buttons.

User make a double click on a button.

  • The first click is detected by a first button
3条回答
  •  后悔当初
    2021-01-29 08:09

    It would be better if you write a custom function for protractor click:

    protractor.ElementFinder.prototype.waitClick = function(wait){
      browser.sleep(wait);
      this.click();
    };
    
    describe('Tests', function() {
      element.all(by.css('#testElements')).get(0).waitClick(1000)
    });
    

    Since, overriding the default click function is not recommended.

提交回复
热议问题