Protractor + chrome driver: Element is not clickable at point

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

    Maybe It is not applicable in your case, but I've encountered the same problem and based on Milena's answer I've been looking for another element obscuring my button (in my case, a dropdown menu in the top right of my screen).

    It appears to be the Connected to Browser Sync notification message sent by browsersync, launched by Gulp. The message vanished after a short time, but after my onClick() call.

    To remove the notification, in my gulpfile, I've added the notify: false param when initializing browsersync:

    browserSync.init(files, {
        server: {
            baseDir: "dist",
            index: "index.html"
        },
        notify: false
    });
    
    0 讨论(0)
  • 2020-12-14 01:23

    Following worked fine for me:

    browser.actions().mouseMove(element).click();
    

    Edit: If above does not work try chaining perform() method too(I got this as an edit suggestion, I have not tested it but somebody could verify it and comment)

    browser.actions().mouseMove(element).click().perform();
    
    0 讨论(0)
提交回复
热议问题