Java org.openqa.selenium.WebDriverException:发生

Java org.openqa.selenium.WebDriverException:发生,java,appium,Java,Appium,实际上,元素是集中的,但没有被单击。根据您的代码,您使用的xpath策略似乎不正确 理想情况下,xpath应该是://className[@attributeName='attributeValue'] e、 g://android.view.view[@text='myApp'] public void GameSeeTab() throws InterruptedException { Thread.sleep(6000); if(driver.findElement(By.x

实际上,元素是集中的,但没有被单击。

根据您的代码,您使用的xpath策略似乎不正确

理想情况下,xpath应该是://className[@attributeName='attributeValue']

e、 g://android.view.view[@text='myApp']

public void GameSeeTab() throws InterruptedException {
   Thread.sleep(6000);

   if(driver.findElement(By.xpath(Constant.GAMESEE_TAB)).isDisplayed()) {
      System.out.println("Displayed");
      Thread.sleep(2000);
      AndroidElement hh=driver.findElement(By.xpath(Constant.GAMESEE_TAB));
      hh.click();   // here Webdriver exception is occured  
   }