Beispiel #1
0
def get_current_url():
    """
    Get a current URL
    """
    try:
        _webview_ready.wait(5)
        return gui.get_current_url()
    except NameError:
        raise Exception(
            "Create a web view window first, before invoking this function")
Beispiel #2
0
def get_current_url():
    """
    Get a current URL
    """
    try:
        _webview_ready.wait(5)
        assert gui.is_running()
        return gui.get_current_url()
    except NameError:
        raise Exception("Create a web view window first, before invoking this function")
    except AssertionError:
        raise Exception("Cannot call function: the webview has been closed")
Beispiel #3
0
def get_current_url(uid='master'):
    """
    Get a current URL
    :param uid: uid of the target instance
    """
    try:
        _webview_ready.wait(5)
        return gui.get_current_url(uid)
    except NameError:
        raise Exception('Create a web view window first, before invoking this function')
    except KeyError:
        raise Exception('Cannot call function: No webview exists with uid: {}'.format(uid))
Beispiel #4
0
def get_current_url(uid='master'):
    """
    Get the URL currently loaded in the target webview
    :param uid: uid of the target instance
    """
    return gui.get_current_url(uid)