title: Fastlane Scan "Failed to synthesize event" when running UI Tests, works from Xcode
body: <p>I have some UI Tests for my Swift project (iOS application, Swift 5) that work when running them from Xcode; however when I run them using <code>fastlane scan</code>, they always fail at the same point on each test that involves typing into text fields and I am not sure why.</p>
  
  <p>The failure comes from filling out a UITextField, then attempting to tap the next one and fill that in.</p>
  
  <p>Example:</p>
  
  <pre><code>app.textFields[“identifierOne”].tap()
  app.textFields[“identifierOne”].typeText(“Text to Type”)
  
  app.textFields[“identifierTwo”].tap()
  app.textFields[“identifierTwo”].typeText(“Text to Type”)
  </code></pre>
  
  <p>This results in: </p>
  
  <blockquote>
    <p>Failed to synthesize event: Neither element nor any descendant has keyboard focus. Event dispatch snapshot: TextField, label: ‘identifierTwo‘, placeholderValue: ‘Some ‘Value‘‘</p>
  </blockquote>
  
  <p>As I mentioned earlier, this works when running the exact same tests from Xcode. I am at a loss with this one, any help is greatly appreciated.</p>