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