microsoft / WinAppDriver

Windows Application Driver
MIT License
3.66k stars 1.4k forks source link

ContextClick() and move() functions are not working when used Winappdriver with typescript #1922

Open vinaygadegela opened 1 year ago

vinaygadegela commented 1 year ago

I am working on Winappdiver + Webdriver + Appium using typescript.Below are the versions of each lib in package.json

"selenium-appium": "^1.0.2", "selenium-webdriver": "^3.6.0", "winappdriver": "^0.0.7"

Below is the code snippet used and its works fine for Actions double click()

let elem = await driver.findElement(By.xpath("//*[@Name ='Sheet1']"));
await driver.actions().doubleClick(elem).perform();

However, when trying to work other apis of Actions class , it is throwing below error :

Code Used :

let ele = await driver.findElement( By.xpath("//*[@Name ='C4']"));
await driver.actions().contextClick(ele).perform();

Error Observed : "TypeError: selenium_appium_1.driver.actions(...).contextClick is not a function"

Code Used :

let ele = await driver.findElement( By.xpath("//*[@Name ='C4']"));
await driver.actions().move({x: 10, y: 10, duration:10, origin: ele}).contextClick(ele).perform();

Error Observed : "TypeError: selenium_appium_1.driver.actions(...).move is not a function"

Note:

  1. For selenium-appium - 1.0.2 version, we couldn't able to use any selenium-webdriver version apart from 3.6.0 as it resulting some errors in driver creation and using the driver object
  2. Verified in Windows 10 and Windows 11
anunay1 commented 1 year ago

Any specific reason behind using typescript?

vinaygadegela commented 1 year ago

We have an existing framework which is built on Selenium,nodejs and typescript so want to use the same framework and integrate Winappdriver as well.

anunay1 commented 1 year ago

From the error it appears that it's not a issue with winapp driver.