Appium Python iOS. Find by NAME vs. XPATH
Столкнулся с проблемой поиска элемента по селектору. К примеру возьмем элемент
<XCUIElementTypeImage type="XCUIElementTypeImage" name="TraTaTa" enabled="true" visible="false" accessible="false" x="0" y="146" width="414" height="184" index="0"/>
Поиск по элементу и клик проходят успешно
driver.find_element(AppiumBy.NAME, "TraTaTa").click()
Тот же самый элемент и xpath
selector = '//XCUIElementTypeImage[@name="TraTaTa"]'
driver.find_element(AppiumBy.XPATH, selector).click()
Message: An element could not be located on the page using the given search parameters.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
NoSuchElementError: An element could not be located on the page using the given search parameters.
at XCUITestDriver.doNativeFind (/Users/*/.appium/node_modules/appium-xcuitest-driver/lib/commands/find.js:143:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at XCUITestDriver.findNativeElementOrElements (/Users/*/.appium/node_modules/appium-xcuitest-driver/lib/commands/find.js:97:12)
at XCUITestDriver.findElOrEls (/Users/*/.appium/node_modules/appium-xcuitest-driver/lib/commands/find.js:24:14)
at XCUITestDriver.findElOrElsWithProcessing (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/commands/find.ts:60:12)
at XCUITestDriver.findElement (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/commands/find.ts:75:12)
C чем это связано, хочу разобраться, помогите плз, могу пользоваться и другим, но мне желателен xpath