0

Using Apppium WinAppDriver to automate my Windows application tests. All working fine, versions:

  • Selenium 3.14.0
  • Appium-python-client 2.0.0

My problem is that i have some resources which can not be located using find_element(By.NAME,"name") because name is empty. I've tried to use accessibility id which should be automation id as presented by inpsect.exe.

But core selenium driver does not support it and i should use "appiumby". Tried the following:

from appium.webdriver.common.appiumby import
driver.find_element(By=AppiumBy.ACCESSIBILITY_ID,value="Button1").click()

But getting error:

ModuleNotFoundError: no module named "appium.webdriver.common.appiumby"

Also when testing directly in python interactive i can import "appium.webdriver.common", but not "appium.webdriver.common.appiumby".

Any ideas how to get it working ?

Also in the source code found this: https://github.com/appium/python-client/blob/b70422b67f5254523ed360e1d196df0df04feab4/appium/webdriver/common/appiumby.py Is deprecated specific to WINDOWS_UI_AUTOMATION only ?

Thanks,

user2913139
  • 557
  • 2
  • 5
  • 13

1 Answers1

0

OK, found the answer:

from appium import webdriver
driver.find_element_by_accessibility_id("Button1").click()

And Button1 value was taken from inspect.exe Automation id value of the locator.

user2913139
  • 557
  • 2
  • 5
  • 13