Protractor + chrome driver: Element is not clickable at point

前端 未结 14 627
悲&欢浪女
悲&欢浪女 2020-12-14 00:20

Hi I am having some trouble getting a basic protractor test to work.

My setup:

  • I use requirejs so I init angular using angular.bootstr
14条回答
  •  爱一瞬间的悲伤
    2020-12-14 01:02

    Had the same issue but was not related to the window size but had to wait for ngAnimation to end.

    So I had to wait until the element was clickable with.

        const msg = 'Waiting for animation timeout after 1s';
        const EC  = new protractor.ProtractorExpectedConditions();
        await browser.wait(EC.elementToBeClickable(model.elements.button.checkCompliance), 1000, `${msg} panel`);
        await model.elements.button.checkCompliance.click();
    

    @note - I am using async/await node 8 feature, you could just as well convert this to regular Promises. Also using ProtractorExpectedConditions instead of ExpectedConditions see documentation

提交回复
热议问题