Protractor flakiness

前端 未结 4 623
忘掉有多难
忘掉有多难 2021-02-02 00:58

I maintain a complex Angular (1.5.x) application that is being E2E tested using Protractor (2.5.x). I am experiencing a problem with this approach, which presents primarily in t

4条回答
  •  遥遥无期
    2021-02-02 01:45

    It's been my experience that some methods (eg. sendKeys()) do not always fire at the expected time, within the controlFlow() queue, and will cause tests to be flakey. I work around this by specifically adding them to the controlFlow(). Eg:

    this.enterText = function(input, text) {
        return browser.controlFlow().execute(function() {
            input.sendKeys(text);
        });
    };
    

提交回复
热议问题