def loadmap(self):
'''
loadmap()
Creates a browser object and loads the webpage.
It sets up the map to the proper zoom level.
Returns the browser on success, None on fail.
'''
browser = webdriver.PhantomJS(desired_capabilities={'phantomjs.page.settings.resourceTimeout': '20000'})
browser.set_window_size(abovetustin_image_width, abovetustin_image_height)
print("getting web page {}".format(self.url))
browser.set_page_load_timeout(15)
browser.get(self.url)
# Need to wait for the page to load
timeout = g_request_timeout
print ("waiting for page to load...")
wait = WebDriverWait(browser, timeout)
element = wait.until(EC.element_to_be_clickable((By.CLASS_NAME,'vrsMenu')))
self.browser = browser
评论列表
文章目录