javascript webdriver.io : click on specific coordinates - Stack Overflow

admin2025-04-26  19

Actually I click on a button and a pop over es. As I click anywhere outside the pop over, it goes. That's what I need to test.

Any suggestions ?

I am thinking to click on some coordinates on the page. Tried doing it with :

1. element.click(coordinates here); // its not working
// Getting TypeError: selector.slice is not a function.

2. element.moveTo('#abc',100,100);
// now I want to click on the moved position but no success so far.

Any help is appreciated.

Actually I click on a button and a pop over es. As I click anywhere outside the pop over, it goes. That's what I need to test.

Any suggestions ?

I am thinking to click on some coordinates on the page. Tried doing it with :

1. element.click(coordinates here); // its not working
// Getting TypeError: selector.slice is not a function.

2. element.moveTo('#abc',100,100);
// now I want to click on the moved position but no success so far.

Any help is appreciated.

Share Improve this question edited Apr 8, 2017 at 13:14 Meghan asked Apr 8, 2017 at 2:02 MeghanMeghan 3052 gold badges6 silver badges18 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 3

Try browser.leftClick(selector,xoffset,yoffset); and for selector the put element that overlays all page when popup is open for example

browser.leftClick('#cboxOverlay',100,100);

api documentation http://webdriver.io/api/action/leftClick.html#Usage

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745659842a312674.html

最新回复(0)