After creating all my tests using Selenium IDE, I decided to export them to JavaScript Mocha for running in travis.
While the tests run smoothly in Selenium IDE and can be exported, I encountered an issue when trying to run them which resulted in the error message "TypeError: driver.actions(...).moveToElement is not a function".
it('Console Page should work', async function() {
await driver.get("https://myurl.com/")
await driver.manage().window().setRect(1536, 824)
await driver.findElement(By.id("loginLink")).click()
{
const element = await driver.findElement(By.id("Password"))
await driver.actions({ bridge: true }).moveToElement(element).clickAndHold().perform() // this line fails
}
Package dependencies:
"dependencies": {
"chai": "^4.2.0",
"mocha": "^7.1.2",
"chromedriver": "^81.0.4044.138",
"selenium-webdriver": "^4.0.0-alpha.7"
}