| 11 | |
| 12 | |
| 13 | class WaitForPageLoad(object): |
| 14 | def __init__(self, browser): |
| 15 | self.browser = browser |
| 16 | |
| 17 | def __enter__(self): |
| 18 | self.old_page = self.browser.find_element_by_tag_name('html') |
| 19 | |
| 20 | def __exit__(self, *args): |
| 21 | WebDriverWait(self.browser, 10).until(staleness_of(self.old_page)) |
| 22 | |
| 23 | |
| 24 | def getContextUrl(browser): |
no outgoing calls