我正在使用 Appium 测试移动应用程序。当我使用 xpath 时,它工作正常,但我无法处理该应用程序的 ID。
//This is working fine
remoteDriver.findElementByXPath("/linear[1]/window[2]/linear[1]/linear[1]/linear[2]/linear[1]/text[2]").click(); // Click on signIn button
// This doesn't recognize the element
remoteDriver.findElementById("ButtonSignIn").click(); // Click on signIn button
如果有人对使用 id 的 appium 有经验,请分享您的经验。
谢谢