最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

xpath - Appium empty element issue. there is no valid attribute to target the element marketplace element - Stack Overflow

programmeradmin1浏览0评论

Body: I’m trying to automate the Facebook Android app using Appium with the uiautomator2 WebDriver. My goal is to click the Marketplace button, but I’m unable to find a proper attribute for it.

Issue: When inspecting the element in Appium Inspector, it does not have a resource-id, content-desc, or text attribute. The inspector is also not displaying the complete details of the element.

What I Have Tried: Searching for the element using different locators: XPath Class name Accessibility ID

Using driver.getPageSource() to check if the element is present in the XML. Attempting driver.find_element_by_xpath("..."), but it fails. Expected Behavior: I expected to find the XPath or another reliable locator for the Marketplace button, but it does not appear in the Appium Inspector.

desired_caps = {
    "platformName": "Android",
    "deviceName": "emulator-5554",
    "appPackage": "com.facebook.katana",
    "appActivity": "com.facebook.katana.MainActivity",
    "automationName": "uiautomator2"
}

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论