title: Is it possible to match UI elements by labels using regex in XCUIElementQuery?
body: <p>I'm currently learning how to create UI Tests in XCode.</p>
  
  <p>I use XCUIElementQuery to locate alert and close it</p>
  
  <pre><code>let dismissSavedPasswordButton = app.alerts["Select a Saved Password to Use With “My App”"].buttons["Not Now"]
  </code></pre>
  
  <p>But for older devices (e.g. running iOS 9), this code should look like this</p>
  
  <pre><code>let dismissSavedPasswordButton = app.alerts["Select a Saved Safari Password to Use With “My App”"].buttons["Not Now"]
  </code></pre>
  
  <p>Is it possible to rewrite this code to make it universal?</p>