Esempio n. 1
0
def page_end():
    """Jump to the bottom of the page."""
    type(text=Key.END)
Esempio n. 2
0
def force_close():
    """Move to the previous frame (can be in content or in chrome)."""
    type(text=Key.F4, modifier=KeyModifier.ALT)
    type(text='u', modifier=KeyModifier.CTRL)
Esempio n. 3
0
def full_screen():
    """Toggle full screen mode."""
    if OSHelper.is_mac():
        type(text='f', modifier=[KeyModifier.CMD, KeyModifier.SHIFT])
    else:
        type(text=Key.F11)
Esempio n. 4
0
def select_search_bar():
    """If the search bar is present, select the search bar, otherwise this selects the location bar."""
    if OSHelper.is_mac():
        type(text='k', modifier=KeyModifier.CMD)
    else:
        type(text='k', modifier=KeyModifier.CTRL)
Esempio n. 5
0
def close_tab():
    """Close the currently focused tab (Except for app tabs)."""
    if OSHelper.is_mac():
        type(text='w', modifier=KeyModifier.CMD)
    else:
        type(text='w', modifier=KeyModifier.CTRL)
Esempio n. 6
0
def edit_undo():
    """Undoes the previous operation."""
    if OSHelper.is_mac():
        type(text='z', modifier=KeyModifier.CMD)
    else:
        type(text='z', modifier=KeyModifier.CTRL)
Esempio n. 7
0
def quick_find_link():
    """Quick find opens simple find link toolbar that remains active for only six seconds."""
    if OSHelper.is_mac():
        type(text="'", modifier=KeyModifier.CMD)
    else:
        type(text="'", modifier=KeyModifier.CTRL)
Esempio n. 8
0
def open_print_page():
    """Open the Print dialog."""
    if OSHelper.is_mac():
        type(text='p', modifier=KeyModifier.CMD)
    else:
        type(text='p', modifier=KeyModifier.CTRL)
Esempio n. 9
0
def open_save_page():
    """Open the Save dialog."""
    if OSHelper.is_mac():
        type(text='s', modifier=KeyModifier.CMD)
    else:
        type(text='s', modifier=KeyModifier.CTRL)
Esempio n. 10
0
def next_frame():
    """Move to the next frame (can be in content or in chrome)."""
    type(text=Key.F6)
Esempio n. 11
0
def previous_frame():
    """Move to the previous frame (can be in content or in chrome)."""
    type(text=Key.F6, modifier=KeyModifier.SHIFT)
Esempio n. 12
0
def focus_previous_item():
    """Focus previous actionable item."""
    type(text=Key.TAB, modifier=KeyModifier.SHIFT)
Esempio n. 13
0
def focus_next_item():
    """Focus next actionable item."""
    type(text=Key.TAB)
Esempio n. 14
0
def page_home():
    """Jump to the top of the page."""
    type(text=Key.HOME)
Esempio n. 15
0
def edit_redo():
    """Redo the last operation of Undo."""
    if OSHelper.is_mac():
        type(text='z', modifier=[KeyModifier.CMD, KeyModifier.SHIFT])
    else:
        type(text='z', modifier=[KeyModifier.CTRL, KeyModifier.SHIFT])
Esempio n. 16
0
def zoom_in():
    """Zoom in one increment."""
    if OSHelper.is_mac():
        type(text='+', modifier=KeyModifier.CMD)
    else:
        type(text='+', modifier=KeyModifier.CTRL)
Esempio n. 17
0
def edit_select_all():
    """Selects the entire contents of focused field or page."""
    if OSHelper.is_mac():
        type(text='a', modifier=KeyModifier.CMD)
    else:
        type(text='a', modifier=KeyModifier.CTRL)
Esempio n. 18
0
def zoom_out():
    """Zoom out one increment."""
    if OSHelper.is_mac():
        type(text='-', modifier=KeyModifier.CMD)
    else:
        type(text='-', modifier=KeyModifier.CTRL)
Esempio n. 19
0
def open_find():
    """Open the find toolbar."""
    if OSHelper.is_mac():
        type(text='f', modifier=KeyModifier.CMD)
    else:
        type(text='f', modifier=KeyModifier.CTRL)
Esempio n. 20
0
def restore_zoom():
    """Restores zoom level to page default."""
    if OSHelper.is_mac():
        type(text='0', modifier=KeyModifier.CMD)
    else:
        type(text='0', modifier=KeyModifier.CTRL)
Esempio n. 21
0
def close_find():
    """Close the regular find toolbar or quick find toolbar, if it has focus."""
    type(text=Key.ESC)
Esempio n. 22
0
def edit_cut():
    """Cut selection to clipboard."""
    if OSHelper.is_mac():
        type(text='x', modifier=KeyModifier.CMD)
    else:
        type(text='x', modifier=KeyModifier.CTRL)
Esempio n. 23
0
def open_search_manager():
    """If the search bar has focus, open the search engine manager."""
    type(text=Key.DOWN, modifier=KeyModifier.ALT)
Esempio n. 24
0
def edit_delete():
    """Delete selected text.

    If nothing is selected, delete previous character.
    """
    type(text=Key.DELETE)
Esempio n. 25
0
def close_window():
    """Close the currently focused window."""
    if OSHelper.is_mac():
        type(text='w', modifier=[KeyModifier.CMD, KeyModifier.SHIFT])
    else:
        type(text='w', modifier=[KeyModifier.CTRL, KeyModifier.SHIFT])
Esempio n. 26
0
def edit_paste():
    """Paste contents of the clipboard to the focused text field."""
    if OSHelper.is_mac():
        type(text='v', modifier=KeyModifier.CMD)
    else:
        type(text='v', modifier=KeyModifier.CTRL)
Esempio n. 27
0
def change_window_view():
    """Change the focus on another window."""
    if OSHelper.is_mac():
        type(text=Key.TAB, modifier=KeyModifier.CMD)
    else:
        type(text=Key.TAB, modifier=KeyModifier.ALT)
Esempio n. 28
0
def edit_paste_plain():
    """Paste contents of the clipboard, as plain text, to the focused text field."""
    if OSHelper.is_mac():
        type(text='v', modifier=[KeyModifier.CMD, KeyModifier.SHIFT])
    else:
        type(text='v', modifier=[KeyModifier.CTRL, KeyModifier.SHIFT])
Esempio n. 29
0
def navigate_back():
    """Navigate back in browsing history one page visit."""
    if OSHelper.is_mac():
        type(text='[', modifier=KeyModifier.CMD)
    else:
        type(text=Key.LEFT, modifier=KeyModifier.ALT)
Esempio n. 30
0
def page_up():
    """Jump up one screen."""
    type(text=Key.SPACE, modifier=KeyModifier.SHIFT)