title: How to UITest UIProgressView?
body: <p><strong>Situation:</strong> </p>
  
  <p>I want to UI-test my progress view and see if it's progress has increased. </p>
  
  <p><strong>What I've tried:</strong> </p>
  
  <p>By using a breakpoint in my UI-test and using the <code>po print(app.debugDescription</code>), I can successfully see and access the <code>UIProgressView</code> element. </p>
  
  <p>It's called: 
  <code>Other, 0x6080003869a0, traits: 8589935104, {{16.0, 285.5}, {343.0, 32.0}}, identifier: 'progressView', label: 'Progress', value: 5%</code></p>
  
  <p>I access it with <code>let progressView = secondTableViewCell.otherElements["progressView"]</code>, which works, as <code>.exists</code> returns true. </p>
  
  <p>Now, to check progress, the description above hints at the 'value' property, that is currently at 5%. However, when I try <code>progressView.value as! String</code> or Double or whichever, I cannot seem to get the property as it isn't NSCoder-compliant. </p>
  
  <p><strong>Question:</strong> </p>
  
  <p>Is it possible to UI-test a UIProgressView and use it's progress value?</p>
  
  <p><strong>My final custom solution:</strong></p>
  
  <p>Using the value property (when casting to String) somehow does work now. As I wanted to check if progress increased over time, I strip the String to get the numeric progress in it to compare. Here is my solution I use now: </p>
  
  <pre><code>// Check if progress view increases over time
  let progressView = secondTableViewCell.otherElements["progressView"]
  XCTAssert(progressView.exists)
  
  let progressViewValueString = progressView.value as! String
  // Extract numeric value from '5%' string
  let progressViewValue = progressViewValueString.components(separatedBy: CharacterSet.decimalDigits.inverted).joined()
  
  // Let progress increase
  sleep(3)
  
  let newProgressViewValueString = progressView.value as! String
  let newProgressViewValue = newProgressViewValueString.components(separatedBy: CharacterSet.decimalDigits.inverted).joined()
  XCTAssert(newProgressViewValue &gt; progressViewValue)
  </code></pre>