How could we click on Done button or how to make ios simulator keyboard dissapear

How could we click on Done button or how to make ios simulator keyboard dissapear

there are many ways to hide keyboard:

  1. press “go” button → hiding keyboard and starting next action on screen
  2. swipe
  3. tap “Done” button

To tap Done button i use locator →

@iOSXCUITFindBy(iOSNsPredicate = "type == 'XCUIElementTypeButton' AND name == 'Done'")

Thank you so. much. this is working fine …

I used the following code
WebElement keyBoardDoneTwo= driver.findElement(AppiumBy.iOSNsPredicateString(“type == ‘XCUIElementTypeButton’ AND name == ‘Done’”));
if (keyBoardDoneTwo.isDisplayed()){
keyBoardDoneTwo.click();
System.out.println(“Keyboard is clicked”);
}