0
在我的應用程序中,我需要點擊一個子元素,由於某種原因,它不工作。點擊appium中的一個子元素
這是父元素:
WebElement element = device.getDriverWrapper().getIosDriver().findElement(By.xpath("//UIACollectionView[1]/UIACollectionCell[4]"));
該元素包含的TextView和鎖定。我需要按下鎖。
這是子元素:
WebElement child = element.findElement(By.xpath("//UIAButton[1]"));
child.click();
任何想法,我做錯了什麼?
感謝
你需要父元素嗎?是否有一個原因,你不只是使用「//UIACollectionView [1]/UIACollectionCell [4]/UIAButton [1]」? – econoMichael