title: Page Object Pattern for Xcode 7 UI Tests
body: <p>Has anyone successfully implemented the Page Object pattern in their UI tests?  I gave it a try and ran into an issue.  When I use the predicate to wait for the element to exist, I get a warning in the log.  Here's a code snippet from the Page Object class:</p>
  
  <pre><code>XCUIElement *myCoolButton = self.app.buttons[@"Super Cool Button"];
  [self expectationForPredicate:self.existsPredicate evaluatedWithObject:myCoolButton handler:nil];
  [self waitForExpectationsWithTimeout:5.0f handler:nil];
  </code></pre>
  
  <p>When this code executes, I see the following in the log:</p>
  
  <pre><code>Questionable API usage: creating XCTestExpectation for test case -[MyPageObject (null)] which is not the currently running test case -[MyTestCase test]
  </code></pre>
  
  <p>and when the timeout is exceeded, I see the error in the log but the test itself doesn't actually fail.  I'm assuming that this is because the predicate is set up in the Page Object class, not the test itself.  Has anyone been able to work around this?</p>