nightwatch.js - How to click at a certain location in div -


i want execute click on full-screen div underneath (non full-screen) modal dialog. seems click event automatically targets center of background div, thereby touching content that's on top of div (the modal dialog itself).

how can specify click should happen?

this verbose output of click command:

element not clickable @ point (640, 436). other element receive click: <label class="btn btn-default ">...

the root of problem selenium clicks sending mouseclick event not directly element screen coordinates. therefore cannot find clickable element point (as described in verbose output).

there 2 possible workaround (for case):

1) click element position not overlapped modal dialog (applicaple fullscreen div):

.movetoelement('.backdrop', 900, 10) // 900 x offset .mousebuttonclick(0) 

2) better, universal solution. directily sending click event via injected javascript:

.execute(function(selector) {       document.queryselector(selector).click();    }, ['.backdrop']) 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -