In webdriver.io I am trying to focus on element then click another element
the code looks like this:
browser.moveToObject(focusSelector)
.click(clickSelector);
the issue is that the focus bring an loading overlay on the page and when I try to click some times the overlay is receiving the click, and the code fails with this exception:
unknown error: Element <div data-bo="UserMenu">...</div> is not clickable at point (1203, 28).
Other element would receive the click: <div class="blockUI blockOverlay"></div>
so I need to wait when the overlay .blockUI will disappear and only then do the click....
I had tried to do:
browser.moveToObject(focusSelector);
browser.waitForExist('.blockUI', browser.options.waitforTimeout, true);
browser.click(clickSelector);
But this won't work cause after moveToObject ,the focus is lost and the click selector is not displayed.
while in:
browser.moveToObject(focusSelector)
.click(clickSelector);
the focus is not lost... but then I have the overlay issue....
Any Ideas?