Zed
Zed

Reputation: 191

Clicking away from popup window

In the app there is a plot which when clicked open a floating popup window.

There are multiple ways of closing the pop up e.g. clicking close button on pop up window or clicking outside that window.

I just want to know how I can simulate clicking outside popup window with protractor?

Upvotes: 3

Views: 4967

Answers (1)

user7509681
user7509681

Reputation: 37

There are many ways of doing it however one of the easiest would be to move mouse to a particular location and click. It can be done simply by -

browser.actions().
    mouseMove({x: 50, y: 0}).
    doubleClick().
    perform();

Also give the x and y co-ordinates as per your page and requirements. This will only work if you have switched to pop-up window!

Upvotes: 3

Related Questions