我试图通过Appium自动化React本机android应用程序,我试图点击按钮但它是clicakble=false
所以我无法再做进一步的脚本
答案 0 :(得分:0)
尝试使用JavascriptExecutor
WebElement element = driver.findElement(By.xpath("Your Xpath"));
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", element);
OR
Point point = ad.findElement(filter).getLocation();
int elementCenterX = point.getX() + 80;
int elementCenterY = point.getY() + 100;
System.out.println("value of x = "+elementCenterX+" value of y = "+elementCenterY);
ad.tap(2, elementCenterX , elementCenterY , 0);
System.out.println("click on result");