def visit_page(
context: Context, actor_alias: str, page_name: str, *,
first_time: bool = False):
"""Will visit specific page.
NOTE:
In order for the retry scheme to work properly you should have
the webdriver' page load timeout set to value lower than the retry's
`wait_fixed` timer, e.g `driver.set_page_load_timeout(time_to_wait=30)`
"""
if not get_actor(context, actor_alias):
add_actor(context, unauthenticated_actor(actor_alias))
context.current_page = get_page_object(page_name)
logging.debug(
"%s will visit '%s' page using: '%s'", actor_alias, page_name,
context.current_page.URL)
context.current_page.visit(context.driver, first_time=first_time)
评论列表
文章目录