Ios simulator. Button Enter not work in browser

Hello, can help me guys. I have some issue, in ios simulator dont work Enter in mobile browser, when run autotest.
Here is my code:
Also i used driver.getKeyboard().sendKeys(Keys.ENTER); or driver.getKeyboard().pressKey(Keys.ENTER); but that didn’t help either

here link on record video with my cause -

This is a very strange problem because this code works on Android

public class IOSTest extends BaseIos {

public void findInformationInBrowser() {
    WebElement searchInGoogle = driver.findElement("q"));


package Pages.Ios;

import io.appium.java_client.MobileElement;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.remote.AutomationName;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;


public class BaseIos {
public IOSDriver driver;

public void setup() {
    try {
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
        capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "15.0");
        capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 13 Pro");
        capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST);
        capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "safari");

        URL url = new URL("");
        driver = new IOSDriver(url, capabilities);
    catch (Exception exception){
        System.out.println("Cause is " + exception.getCause());
        System.out.println("Message is " + exception.getMessage());

public void tearDown(){


I’d try to locate and tap the corresponding key on the on-screen keyboard if possible. Also, one could try to send \n

If I press the key manually the search is done but not in the self test. \n also did not help

I wouldn’t count on code being completely independent from the OS/testing framework. I’m actually amazed that any code works on both OS’s without any change.

Can you watch the automation run and see where it is clicking? Might need some decision tree like:

if iOS {
   <find by iOS means>
}  elsif Android {
   <find by Android means>

This is actually fairly common.