The problem
I'm trying to wait for an element to be clickable. This exact same wait does work for our web automation tests, but is showing the following error for mobile elements:
AttributeError: type object 'Command' has no attribute 'IS_ELEMENT_DISPLAYED'
This is the wait we're trying to perform
element = WebDriverWait(parent, timeout, poll_frequency=poll, ignored_exceptions=[ElementNotVisibleException, ElementNotSelectableException, StaleElementReferenceException])\ .until(expected_conditions.element_to_be_clickable(selector))
"parent" is the driver
"timeout" is a value given in seconds
"selector" is a tuple that has the location strategy and the locator itself. e.g. ('-android uiautomator', 'new UiSelector().textContains("get started")')
Environment
- Appium version (or git revision) that exhibits the issue: Currently testing over
selenium>=4.1.3 and Appium-Python-Client>=2.1.4
- Desktop OS/version used to run Appium: macOS Monterey
- Node.js version (unless using Appium.app|exe):
- Mobile platform/version under test: Android 10
- Real device or emulator/simulator: emulator
- Appium CLI or Appium.app|exe: 1.22.0
Details
Worth to mention that if I perform a driver.find_element(*selector) it does find the element. It shows the following result <appium.webdriver.webelement.WebElement (session="a7f5a8a1-4e63-4847-bcc7-265666d7760b", element="00000000-0000-010c-ffff-ffff0000001e")>. But, if I try to use the expected condition ".element_to_be_clickable" it shows the error mentioned at the beginning
The problem
I'm trying to wait for an element to be clickable. This exact same wait does work for our web automation tests, but is showing the following error for mobile elements:
AttributeError: type object 'Command' has no attribute 'IS_ELEMENT_DISPLAYED'This is the wait we're trying to perform
element = WebDriverWait(parent, timeout, poll_frequency=poll, ignored_exceptions=[ElementNotVisibleException, ElementNotSelectableException, StaleElementReferenceException])\ .until(expected_conditions.element_to_be_clickable(selector))"parent" is the driver
"timeout" is a value given in seconds
"selector" is a tuple that has the location strategy and the locator itself. e.g.
('-android uiautomator', 'new UiSelector().textContains("get started")')Environment
selenium>=4.1.3andAppium-Python-Client>=2.1.4Details
Worth to mention that if I perform a
driver.find_element(*selector)it does find the element. It shows the following result<appium.webdriver.webelement.WebElement (session="a7f5a8a1-4e63-4847-bcc7-265666d7760b", element="00000000-0000-010c-ffff-ffff0000001e")>. But, if I try to use the expected condition ".element_to_be_clickable" it shows the error mentioned at the beginning