appium/appium — pull request #4044 by paymand (2014-11-12 19:24:46+00:00)
Title: iOS: Fix for a bug when driver.get() never returns for page with alert.

Running:
```python
switch_to.context("WEBVIEW")
driver.get("http://twitch.tv")
alert = driver.switch_to.alert()
alert.dismiss()
```
Appium gets stuck after ``driver.get`` forever (or until it hits the command timeout and the session is closed).
The website in the test, *twitch.tv*, opens up an alert while we are checking for readyState and it blocks the javascript thread it seems. As a result the call to ``checkPageIsReady`` never returns while the alert is present.
Regardless, the ``pageLoad`` function is not supposed to take more than ``waitMs`` and this is what my fix tries to achieve by adding a new timeout.