|
Mozilla Iris
1.0
A visual test suite for Firefox
|
Classes | |
| class | Option |
| class | RightClickLocationBar |
| class | ZoomType |
| def iris.api.helpers.general.access_bookmarking_tools | ( | option | ) |
Access option from 'Bookmarking Tools'. :param option: Option from 'Bookmarking Tools'. :return: None.
| def iris.api.helpers.general.bookmark_options | ( | option | ) |
Click a bookmark option after right clicking on a bookmark from the library menu. :param option: Bookmark option to be clicked. :return: None.
| def iris.api.helpers.general.change_preference | ( | pref_name, | |
| value | |||
| ) |
Change the value for a specific preference. :param pref_name: Preference to be changed. :param value: Preference's value after the change. :return: None.
| def iris.api.helpers.general.click_cancel_button | ( | ) |
Click cancel button.
| def iris.api.helpers.general.click_hamburger_menu_option | ( | option | ) |
Click on a specific option from the hamburger menu. :param option: Hamburger menu option to be clicked. :return: The region created starting from the hamburger menu pattern.
| def iris.api.helpers.general.click_window_control | ( | button, | |
window_type = 'auxiliary' |
|||
| ) |
Click window with options: close, minimize, maximize, restore, full_screen. :param button: Auxiliary or main window options. :param window_type: Type of window that need to be controlled. :return: None.
| def iris.api.helpers.general.close_content_blocking_pop_up | ( | ) |
Closes the content blocking pop up
| def iris.api.helpers.general.close_customize_page | ( | ) |
Close the 'Customize...' page by pressing the 'Done' button.
| def iris.api.helpers.general.close_firefox | ( | test | ) |
| def iris.api.helpers.general.close_window_control | ( | window_type | ) |
Click on close window control. :param window_type: Type of window that need to be closed. :return: None.
| def iris.api.helpers.general.confirm_close_multiple_tabs | ( | ) |
Click confirm 'Close all tabs' for warning popup when multiple tabs are opened.
| def iris.api.helpers.general.confirm_firefox_launch | ( | image = None | ) |
Waits for firefox to exist by waiting for the iris logo to be present. :param image: Pattern to confirm Firefox launch :return: None.
| def iris.api.helpers.general.copy_to_clipboard | ( | ) |
Return the value copied to clipboard.
| def iris.api.helpers.general.create_firefox_args | ( | test_case | ) |
Create a list with firefox arguments. :param test_case: Instance of BaseTest class. :return: list of firefox arguments.
| def iris.api.helpers.general.create_region_for_hamburger_menu | ( | ) |
Create region for hamburger menu pop up.
| def iris.api.helpers.general.create_region_for_url_bar | ( | ) |
Create region for the right side of the url bar.
| def iris.api.helpers.general.create_region_from_image | ( | image | ) |
Create region starting from a pattern. :param image: Pattern used to create a region. :return: None.
| def iris.api.helpers.general.dont_save_password | ( | ) |
Do not save the password for a login.
| def iris.api.helpers.general.find_window_controls | ( | window_type | ) |
Find window controls for main and auxiliary windows. :param window_type: Controls for a specific window type. :return: None.
| def iris.api.helpers.general.full_screen_control | ( | window_type | ) |
Click on full screen window mode (Applicable only for MAC system). :param window_type: Type of window that need to be maximized in full screen mode. :reurn: None.
| def iris.api.helpers.general.get_firefox_build_id | ( | build_path | ) |
Returns build id string from the dictionary generated by mozversion library. :param build_path: Path to the binary for the application or Android APK file.
| def iris.api.helpers.general.get_firefox_build_id_from_about_config | ( | ) |
Returns the Firefox build id from 'about:config' page.
| def iris.api.helpers.general.get_firefox_channel | ( | build_path | ) |
Returns Firefox channel from application repository. :param build_path: Path to the binary for the application or Android APK file.
| def iris.api.helpers.general.get_firefox_channel_from_about_config | ( | ) |
Returns the Firefox channel from 'about:config' page.
| def iris.api.helpers.general.get_firefox_info | ( | build_path | ) |
Returns the application version information as a dict with the help of mozversion library. :param build_path: Path to the binary for the application or Android APK file.
| def iris.api.helpers.general.get_firefox_locale_from_about_config | ( | ) |
Returns the Firefox locale from 'about:config' page.
| def iris.api.helpers.general.get_firefox_region | ( | ) |
For now, just return the Primary Monitor.
| def iris.api.helpers.general.get_firefox_version | ( | build_path | ) |
Returns application version string from the dictionary generated by mozversion library. :param build_path: Path to the binary for the application or Android APK file.
| def iris.api.helpers.general.get_firefox_version_from_about_config | ( | ) |
Returns the Firefox version from 'about:config' page.
| def iris.api.helpers.general.get_main_modifier | ( | ) |
Return the main modifier.
| def iris.api.helpers.general.get_menu_modifier | ( | ) |
Return the menu modifier.
| def iris.api.helpers.general.get_pref_value | ( | pref_name | ) |
Returns the value of a provided preference from 'about:config' page. :param pref_name: Preference's name. :return: Preference's value.
| def iris.api.helpers.general.get_support_info | ( | ) |
Returns support information as a JSON object from 'about:support' page.
| def iris.api.helpers.general.get_telemetry_info | ( | ) |
Returns telemetry information as a JSON object from 'about:telemetry' page.
| def iris.api.helpers.general.key_to_one_off_search | ( | highlighted_pattern, | |
direction = 'left' |
|||
| ) |
Iterate through the one of search engines list until the given one is highlighted. param: highlighted_pattern: The pattern image to search for. param: direction: direction to key to: right or left (default) return: None.
| def iris.api.helpers.general.launch_firefox | ( | path, | |
profile = None, |
|||
url = None, |
|||
args = None, |
|||
show_crash_reporter = False |
|||
| ) |
Launch the app with optional args for profile, windows, URI, etc. :param path: Firefox path. :param profile: Firefox profile. :param url: URL to be loaded. :param args: Optional list of arguments. :param show_crash_reporter: Enable or disable Firefox Crash Reporting tool. :return: List of Firefox flags.
| def iris.api.helpers.general.login_site | ( | site_name | ) |
Login into a specific site. :param site_name: Name of the site. :return: None.
| def iris.api.helpers.general.maximize_window_control | ( | window_type | ) |
Click on maximize window control. :param window_type: Type of window that need to be maximized. :return: None.
| def iris.api.helpers.general.minimize_window_control | ( | window_type | ) |
Click on minimize window control. :param window_type: Type of window that need to be minimized. :return: None.
| def iris.api.helpers.general.navigate | ( | url | ) |
Navigates, via the location bar, to a given URL. :param url: The string to type into the location bar. :return: None.
| def iris.api.helpers.general.navigate_slow | ( | url | ) |
Navigates slow, via the location bar, to a given URL. :param url: The string to type into the location bar. :return: None. The function handles typing 'Enter' to complete the action.
| def iris.api.helpers.general.open_about_firefox | ( | ) |
Open the 'About Firefox' window.
| def iris.api.helpers.general.open_directory | ( | directory | ) |
| def iris.api.helpers.general.open_library_menu | ( | option | ) |
Open the Library menu with an option as argument. :param option: Library menu option. :return: Custom region created for a more efficient and accurate image pattern search.
| def iris.api.helpers.general.open_zoom_menu | ( | ) |
Open the 'Zoom' menu from the 'View' menu.
| def iris.api.helpers.general.remove_zoom_indicator_from_toolbar | ( | ) |
Remove the zoom indicator from toolbar by clicking on the 'Remove from Toolbar' button.
| def iris.api.helpers.general.repeat_key_down | ( | num | ) |
Repeat DOWN keystroke a given number of times. :param num: Number of times to repeat DOWN key stroke. :return: None.
| def iris.api.helpers.general.repeat_key_down_until_image_found | ( | image_pattern, | |
num_of_key_down_presses = 10, |
|||
delay_between_presses = 3 |
|||
| ) |
Press the Key Down button until specified image pattern is found. :param image_pattern: Image Pattern to search. :param num_of_key_down_presses: Number of presses of the Key Down button. :param delay_between_presses: Number of seconds to wait between the Key Down presses :return: Boolean. True if image pattern found during Key Down button pressing, False otherwise
| def iris.api.helpers.general.repeat_key_up | ( | num | ) |
Repeat UP keystroke a given number of times. :param num: Number of times to repeat UP key stroke. :return: None.
| def iris.api.helpers.general.repeat_key_up_until_image_found | ( | image_pattern, | |
num_of_key_up_presses = 10, |
|||
delay_between_presses = 3 |
|||
| ) |
Press the Key Up button until specified image pattern is found. :param image_pattern: Image Pattern to search. :param num_of_key_up_presses: Number of presses of the Key Up button. :param delay_between_presses: Number of seconds to wait between the Key Down presses :return: Boolean. True if image pattern found during the Key Up button pressing, False otherwise
| def iris.api.helpers.general.reset_mouse | ( | ) |
Reset mouse position to location (0, 0).
| def iris.api.helpers.general.restart_firefox | ( | test, | |
| path, | |||
| profile, | |||
| url, | |||
args = None, |
|||
image = None, |
|||
show_crash_reporter = False |
|||
| ) |
Restart the app with optional args for profile. :param test: current test :param path: Firefox path. :param profile: Firefox profile. :param url: URL to be loaded. :param args: Optional list of arguments. :param image: Image checked to confirm that Firefox has successfully :param show_crash_reporter: Enable or disable Firefox Crash Reporting tool. restarted. :return: None.
| def iris.api.helpers.general.restore_firefox_focus | ( | ) |
Restore Firefox focus by clicking the panel near HOME or REFRESH button.
| def iris.api.helpers.general.restore_window_control | ( | window_type | ) |
Click on restore window control. :param window_type: Type of window that need to be restored. :return: None.
| def iris.api.helpers.general.restore_window_from_taskbar | ( | option = None | ) |
Restore firefox from taskbar.
| def iris.api.helpers.general.scroll_until_pattern_found | ( | image_pattern, | |
| scroll_function, | |||
| scroll_params, | |||
num_of_scroll_iterations = 10, |
|||
timeout = 3 |
|||
| ) |
Scrolls until specified image pattern is found.
:param image_pattern: Image Pattern to search.
:param scroll_function: Scrolling function or any callable object (e.g. type, scroll, etc.)
:param scroll_params: Tuple of params to pass in the scroll_function
(e.g. (Key.UP, ) or (Key.UP, KeyModifier.CTRL) for the type function).
NOTE: Tuple should contains from 0 (empty tuple) to 2 items.
:param num_of_scroll_iterations: Number of scrolling iterations.
:param timeout: Number of seconds passed to the 'timeout' param of the 'exist' function.
:return: Boolean. True if image pattern found during scrolling, False otherwise
| def iris.api.helpers.general.select_location_bar_option | ( | option_number | ) |
Select option from the location bar menu. :param option_number: Option number. :return: None.
| def iris.api.helpers.general.select_zoom_menu_option | ( | option_number | ) |
Open the 'Zoom' menu from the 'View' menu and select option.
| def iris.api.helpers.general.wait_for_firefox_restart | ( | ) |
Wait for Firefox to restart.
| def iris.api.helpers.general.write_profile_prefs | ( | test_case | ) |
Add test case setup prefs. :param test_case: Instance of BaseTest class. :return: None.
| def iris.api.helpers.general.zoom_with_mouse_wheel | ( | nr_of_times = 1, |
|
zoom_type = None |
|||
| ) |
Zoom in/Zoom out using the mouse wheel.
:param nr_of_times: Number of times the 'zoom in'/'zoom out' action should
take place.
:param zoom_type: Type of the zoom action('zoom in'/'zoom out') intended to
be performed.
:return: None.