-
Notifications
You must be signed in to change notification settings - Fork 19
webdriverio moveToObject() #30
Description
The problem
When using the moveToObject() function. it seems that its not opening the dropdown menu of a page.
Environment
WebdriverIO version: 4.14.2
If WDIO Testrunner, running sync/async: async
Node.js version: v8.11.2
NPM version: 6.4.1
Browser name and version: Chrome Version 71.0.3578.98 (Official Build) (64-bit)
Platform name and version: MacOSX 10.13.6 (remotely)
Details
I am trying to simulate a mouse over on a bootstrap menu in a browser. the issue is that I'm not able to do a click command because the menu will only open if you hover the mouse pointer and when the time that you will try to click it. the menu disapear.
I can verify that the element is there because when using a click Command, it will open and close the menu. so when using the moveToObject() it doesn't have any error. only warning on the deprication and it will pass the test but it did not open the menu. Below is the code/function I created. I also did the actions command and touchAction but seems not working as well.
Link to Selenium/WebdriverIO logs
n/a
Code To Reproduce Issue [ Good To Have ]
async hover(locator) {
const errorMsg = UNSUCCESSFULL_MESSAGE + locator;
await this.executeWithErrorHandling(async () => {
await this.browser.waitForExist(locator, 20000);
await this.browser.moveToObject(locator);
}, errorMsg);
await this.pauseForInSeconds(1);
}