Appium driver.find_element() returns Dictionary [Error]

Viewed 111

Appium verison: 2.1.4
Selenium version: 4.0.0

driver.find_element() returns a dictionary instead of an element object, so while doing driver.find_element().click() the following error is thrown.

'dict' object has no attribute 'click'

Similar question can be found here and here

But the fix didnt work. Any help would be appreciated

1 Answers

A workaround to solve this without updating Appium:

if type(element) is dict:
    first_element = list(element.values())[0]
    element = driver.create_web_element(element_id=first_element)
Related