导航

 

前言

go_to在当前的Web浏览器窗口中打开指定的URL

入参介绍

url

def go_to(url):
    """
    :param url: URL to open.
    :type url: str

    Opens the specified URL in the current web browser window. For instance::

        go_to("google.com")
    """
    _get_api_impl().go_to_impl(url)
 
def go_to_impl(self, url):
if '://' not in url:
url = 'http://' + url
self.require_driver().get(url)

举例说明

1、查看入参介绍的go_to_impl函数就是实际调用的方法

如果传入的参数没有://,会自动加上http://

经常使用在登录到平台以后,在不同模块的url之间跳转

 

欢迎关注