appium / appium-mac2-driver

Next-gen Appium macOS driver, backed by Apple XCTest
Apache License 2.0
116 stars 24 forks source link

Unable to check focused state of element. #144

Closed grokys closed 2 years ago

grokys commented 2 years ago

In Selenium, the recommended way to check if an element is focused is to use:

element.equals(driver.switchTo().activeElement());

However this does not work using the appium-mac2-driver as it appears that it's not possible to compare two elements for equality in appium:

Is there a way of doing this currently? If not:

mykola-mokhnach commented 2 years ago

https://github.com/appium/appium-mac2-driver/pull/145 should do the job

grokys commented 2 years ago

Wow, thank you! I didn't expect a reply so quickly, never mind a PR ;) I will get the driver building locally and try this out.