Button of native popup can be inspected but cannot be click

The problem
The button with text ‘OK’ can be inspected but cannot be clicked. And “Interactions are not available for this element” is shown when selecting the button in the inspector of Appium.

Environment

  • Appium version 1.13.0
  • iOS version 13.1
  • Testing on real device iPad
  • MacOS 10.14.6
  • Java 12.0.2
  • Eclipse 2019-06 (4.12.0)

Details
There is a button “OK” in a native popup that cannot be interacted with.
I have tried to run driver.findElementByName("OK").click(); and Appium did click the button actually but it show no effect. Appium returns 200 code, but nothing happens on the device screen.

Also, I read the method proposed by ganjarpanji in https://github.com/facebookarchive/WebDriverAgent/issues/602

public void tapByElement(AppiumDriver<WebElement> driver, WebElement element) {
		int startX = element.getLocation().getX();
		int addition = (int) (element.getSize().height * 0.5);
		int endX = startX + addition;
		int startY = element.getLocation().getY();
		new TouchAction(driver).tap(point(endX, startY)).perform();
	}

However, it does not work for my case.

Any help in this regard will be appreciated.

Thanks.