title: Appium XCUITest iOSDriver sendkeys() not working
body: <p>TLDR: 
  <code>sendKeys()</code> not working in web application text field, but only with IOSDriver/XCUITest and only on my web app's page. When running the same test in an Android simulator it works fine on my page, and everywhere else that I've tested (google and ask.com search inputs), but when I test in an iOS simulator, <code>sendKeys()</code> does not work on my web app's page, but works everywhere else (google and ask.com) and I have no idea why.</p>
  
  <p>Capabilities config file:</p>
  
  <p><code>["Safari", "12.2", "iOS", "iPhone Simulator", "XCUITest", "1.12.1"]</code></p>
  
  <p>The test:</p>
  
  <pre><code>public class AppiumFieldsTest extends TestBase {
      @Test(dataProvider = "appium", groups = "Appium", description = "appium fields test")
      public void appiumFieldsTest(String browser, String version, String platform, String device, Method method, String automationName, String appiumVersion) throws Exception {
  
          IOSDriver&lt;WebElement&gt; driver;
          DesiredCapabilities caps = new DesiredCapabilities();
          caps.setCapability(MobileCapabilityType.PLATFORM_NAME, platform);
          caps.setCapability(MobileCapabilityType.PLATFORM_VERSION, version);
          caps.setCapability(MobileCapabilityType.DEVICE_NAME, device);
          caps.setCapability(MobileCapabilityType.AUTOMATION_NAME, automationName);
          caps.setCapability(MobileCapabilityType.BROWSER_NAME, browser);
          caps.setCapability("autoAcceptAlerts", true);
          caps.setCapability("connectHardwareKeyboard", false);
          caps.setCapability("sendKeyStrategy", "oneByOne");
          System.out.println(caps);
          String url = "http://127.0.0.1:4723/wd/hub";
          driver = new IOSDriver(new URL(url), caps);
          driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
  
  driver.get("https://dev-app.pactsafe.com/sign?r=5cd32b47e89fc12f110449ca&amp;s=5b2a6a597a7a3c1e4fa39c0b&amp;signature=kto0Xohrz52ss7kc5z6t0grRbzUPsg6TrfbCbKtRuC5nQM82lNEhFL-zPgN7LaTvGG8mhuifNSc0nayvch1Rgc858Ptx8yRRD9MWJSoD4mEuHFg7LmJ-FHP~UsVEypv-gwwy-6N14BnhdkN94OZ73Kq9mBfS8QGlYKTqa76uclW0FIdnclRfA8NvK0z8CxjPcA8Luv9orw6Ye7wEuHAGqhqFURa15WeFrjrFKW9PNf6NkLVURNvOwqH4xBsfJubCkETMfjtnD4xT7PFSpgykAuU-Av0HehxCFNCYaHmyj5qvB3l9h7xgm8KKoSOO0c9VH1HpnLtwG6KAwwItawcsjg__");
          String textFieldtext = "some random text";
          Thread.sleep(10000);
          WebElement ele = driver.findElementByXPath("//*[@data-name=\"field-5b6305f656bcff936a3c53ca\"]");
          ele.click();
          Thread.sleep(3000);
          ele.sendKeys(textFieldtext);
          Assert.assertEquals(ele.getAttribute("data-value"), textFieldtext);
  ...
  ...
  ...
  </code></pre>
  
  <p>I am trying to do a <code>.click()</code> then a  <code>.sendKeys()</code> on the first field at the top of the page, but it is not sending any text. If you run the test you can see that the field is actually being clicked, as it turns a darker blue color, as expected, but then then the <code>sendKeys()</code> function does nothing. Also, when testing on Android, the keyboard opens on <code>click()</code> but not on iOS.</p>
  
  <ul>
  <li>I've tried all the different <code>sendKeyStratey</code> capabilities and still nothing. </li>
  <li>I've tried different iOS simulators and appium/safari versions, and still get the same results. </li>
  <li>I've tried setting the <code>connectHardwareKeyboard</code> to <code>true</code>, as well as <code>false</code>, and still the same results.</li>
  <li>I've added <code>Thread.sleep()</code> in-between commands - nuthin</li>
  <li>And again, testing on android works fine on my app, google and ask, but when testing on iOS, my app does not work, but google and ask do</li>
  </ul>
  
  <p>The appium logs show that it is indeed trying to send the text after successfully finding the element:</p>
  
  <pre><code>[HTTP] {"id":"5000","text":"some random text","value":["s","o","m","e"," ","r","a","n","d","o","m"," ","t","e","x","t"]}
  [W3C (bf5882ff)] Calling AppiumDriver.setValue() with args: [["s","o","m","e"," ","r","a","n","d","o","m"," ","t","e","x","t"],"5000","bf5882ff-f1a1-4ce1-bb79-02836762cb88"]
  [XCUITest] Executing command 'setValue'
  </code></pre>
  
  <p>Any and all help/suggestions are greatly appreciated</p>