How could we click on Done button or how to make ios simulator keyboard dissapear
there are many ways to hide keyboard:
- press “go” button → hiding keyboard and starting next action on screen
- swipe
- 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”);
}