Protractor + chrome driver: Element is not clickable at point

前端 未结 14 646
悲&欢浪女
悲&欢浪女 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 00:59

    From Gal Malgarit's answer,

    You should set window size in your config file

    onPrepare: function() {
      browser.manage().window().setSize(1600, 800);
    }
    

    If it still doesn't work you should scroll to the element's location

    browser.executeScript('window.scrollTo(720, 881);');
    element(by.id('add-stuff-button')).click();
    

提交回复
热议问题