I am writing a selenium test in Javascript, where I want to move/hover cursor over a particular element. I tried bunch of things, but nothing seems to work -
1. driver.findElement(selector)
.then(element => driver.actions().move({origin:element}).perform())
2. driver.findElement(selector)
.then(element => driver.actions().moveToElement(element).perform())
3. driver.findElement(selector)
.then(element => driver.actions({bridge: true}).moveMouse(element).perform())
4. driver.findElement(selector)
.then(element => driver.actions({bridge: true}).move(element).clickAndHold().perform())
5. driver.findElement(selector)
.then(element => driver.actions({bridge:true}).move({duration:5000,origin:element,x:0,y:0}).perform())
I am consuming 3.6.0 version of selenium-webdriver npm package.
Note - I am able to perform rest all driver actions like click, DoubleClick etc on that element, so essentially there are no issues in discovering that element. Just move action I am unable to perform - it is always giving TypeError: driver.actions(...).move is not a function