Protractor + chrome driver: Element is not clickable at point

前端 未结 14 621
悲&欢浪女
悲&欢浪女 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:07

    Note that this was sometime caused by a top navigation bar or bottom navigation bar / cookie warning bar covering the element. With angular 2, when clicking it scrolls until the element is only just on page. That means that when scrolling down to click something, if there is a bottom navigation, then this will obstruct the click. Similarly, when scrolling up it can be covered by the top navigation.

    For now, to get around the scrolling up, I am using the following:

    browser.refresh();
    browser.driver.sleep(3000);
    

    I made sure that I removed the bottom bar by clicking to close it before the test started.

提交回复
热议问题