How to dismiss the keyboard in appium using Java?

后端 未结 8 1433
梦如初夏
梦如初夏 2021-01-02 03:02

This code just aims to find the textbox and send some text to it. When it does that the keyboard appears on the android device.How to dismiss it after the sendKeys.

8条回答
  •  感动是毒
    2021-01-02 03:55

    Please use Appium 1.0

    Add libraries or add maven dependency of Appium Java client:

    
      io.appium
      java-client
      1.1.0
    
    

    Create driver instance in the following way:

    AppiumDriver driver=null;
    driver= new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
    

    And use the following function to hide the keyboard:

    driver.hideKeyboard();
    

提交回复
热议问题