Introduction

gaiatest is a Python package based on Marionette, which is designed specifically for writing tests against Gaia.

Installation

You will need a Marionette enabled Firefox build that you can successfully connect to.

Before installing gaiatest you may want to consider creating a virtual environment:

virtualenv env_name
source env_name/bin/activate

If you only want to use gaiatest without making changes:

pip install gaiatest

However, if you want to modify gaiatest, first clone the Gaia repository before running setup.py:

git clone https://github.com/mozilla-b2g/gaia.git
cd gaia/tests/python/gaia-ui-tests
python setup.py develop

Command line interface

A helpful command line tool is provided for interacting with Gaia. For full usage details run gcli --help and for help on a specific command use gcli <command> --help.

For example, to unlock the device, set brightness to 100%, connect to an unsecured network, and launch the Settings app:

gcli unlock
gcli setsetting screen.brightness 1
gcli connectwifi MozillaGuest
gcli launchapp Settings

Running tests

To run tests using gaia test, your command-line will vary a little bit depending on what device you’re using. The general format is:

gaiatest [options] /path/to/test_foo.py

For full usage run:

gaiatest --help

Risks

The gaiatest runner restores the target Firefox OS instance to a ‘clean’ state before every test. This means that any personal data such as contacts, SMS/MMS messages, emails, photos, videos, music, etc. will be removed. This will include data on the microSD card. The tests may also attempt to initiate outgoing calls, and may connect to services such as cellular data, WiFi, GPS, bluetooth, etc. Therefore, running tests using the gaiatest runner may cause unintentional data loss and may incur unexpected charges. In order to acknowledge these risks, you must enter the acknowledged_risks key in your test variables file with a true value. Note that this is a JavaScript boolean, so the value true should not be enclosed in quotes.

Disabling the Warning

Once you have acknowledged the risks, you will still be presented with a warning every time you run the test suite. If you are absolutely sure that you will only ever run the tests against suitable test devices, this can be disabled by setting an environment variable named GAIATEST_SKIP_WARNING. For example, you might run the gaiatest command like so:

GAIATEST_SKIP_WARNING=1 gaiatest ... params

Testing on a device

You must run a build of B2G on the device that has Marionette enabled. The easiest way to do that is to flash your device with a nightly ‘engineering’ build, like this one for our reference device (access to these builds is currently restricted).

If you are running the tests on a device connected via ADB (Android Debug Bridge), you must additionally set up port forwarding from the device to your local machine. You can do this by running the command:

adb forward tcp:2828 tcp:2828

ADB can be downloaded as part of the Android SDK.

Testing on desktop

If you don’t have a Firefox OS device, you can download the latest build of the desktop client from here, but make sure you download the appropriate file for your operating system.

  • Linux (32bit): b2g-[VERSION].multi.linux-i686.tar.bz2
  • Linux (64bit): b2g-[VERSION].multi.linux-x86_64.tar.bz2
  • Mac: b2g-[VERSION].multi.mac64.dmg
  • Windows: b2g-[VERSION].multi.win32.zip

Once downloaded, you will need to extract the contents to a local folder. $B2G_HOME refers to the location of the local folder for the remainder of the documentation.

If a profile is specified when running the tests (recommended), a clone of the profile will be used. This helps to ensure that all tests run in a clean state. However, if you also intend to launch and interact with the desktop build manually, we recommend making a copy of the default profile and using the copy for your tests. The location of the default profile is $B2G_HOME/gaia/profile.

Note

The test framework only supports running the tests and B2G instances locally, although in theory it can be used against a running desktop build accessible over the network.

To run the full suite of tests, use the following command:

cd gaia/tests/python/gaia-ui-tests
gaiatest --restart --type b2g --binary $B2G_HOME/b2g-bin --profile $B2G_HOME/gaia/profile \
  --testvars path/to/testvars.json gaiatest/tests/manifest.ini

Filtering tests

Tests can be filtered by type, and the types are defined in the manifest files. Tests can belong to multiple types, some types imply others, and some are mutually exclusive - for example a test cannot be both ‘online’ and ‘offline’ but a test that is ‘lan’ is by definition ‘online’. Be warned that despite these rules, there is no error checking on types, so you must take care when assigning them. Default types are set in the [DEFAULT] section of a manifest file, and are inherited by manifest files referenced by an include.

Here is a list of the types used, and when to use them:

  • antenna - Antenna (headphones) must be connected.
  • b2g - This means the test is a B2G (Firefox OS) test. All tests must include this type.
  • bluetooth - Bluetooth is required.
  • camera - Camera is required.
  • carrier - Active SIM card with carrier connection is required.
  • external - The test requires access to resources outside the host and device, eg the internet.
  • flash - Camera flash is required.
  • lan - Local area connection (not cell data) is required by these tests (see note below).
  • offline - Specifically requires no online connection.
  • online - Connection (lan or carrier) is required.
  • qemu - These tests require the Firefox OS emulator to run.
  • sdcard - Storage device (such as an SD card) must be present.
  • wifi - WiFi connection is required.
  • sanity - Tests exercising core device features (dialer, camera, browser, sms).

Note

You may be thinking that there is only WiFi or cell data, and why the need for the ‘lan’ test type. Well, these tests aren’t only run on physical devices. We also run then on desktop builds, which share the host computer’s connection. It is for this reason that we need ‘lan’ to indicate a connection that is not cell data. For an example of where online/lan/carrier are used take a look at the browser tests.

Test variables

The –testvars option is used to pass in local variables, particularly those that cannot be checked into the repository. For example when running the Gaia UI tests, these variables can be your private login credentials, phone number or details of your WiFi connection.

To use it, copy gaia/tests/python/gaia-ui-tests/gaiatest/testvars_template.json to a different filename but add it into .gitignore so you don’t check it into your repository.

When running your tests add the argument:

--testvars /path/to/testvars.json

Expected variables

  • phone_number - Phone number of the device or array of phone numbers.
  • imei - IMEI number of the device or array of IMEI numbers.
  • remote_phone_number - Phone number that your device can call during the tests (try not to be a nuisance!). Prefix the number with ‘+’ and your international dialing code.
  • wifi - These are the settings of your WiFi connection. Currently this supports WPA/WEP/etc. You can add WiFi networks by doing the following (remember to replace KeyManagement and the password with the value your network supports):
'wifi': {
  'ssid': 'MyNetwork',
  'keyManagement': 'WEP' or 'WPA-PSK',
  'wep': 'MyPassword',
}
'wifi': {
  'ssid': 'MyNetwork',
  'keyManagement': 'WPA-PSK',
  'psk': 'MyPassword'
}

Note

Due to bug 775499, WiFi connections via WPA-EAP are not capable at this time.

  • email - Login information used by the email tests. It can contain different types of email accounts:
'gmail': {
  'email': '',
  'password': ''
}
'imap': {
  'email': '',
  'hostname': '',
  'port': '',
  'username': '',
  'password': ''
}
'activesync': {
  'email': '',
  'hostname': '',
  'username': ''
  'password': '',
}
'smtp': {
  'hostname': 'smtp.example.com',
  'port': 465,
  'username': 'username',
  'password': 'password'
}
  • host - Variables associated with the host machine running the tests (as opposed to the target Firefox OS instance).
'host': {
  'smtp': {
    'email': 'from@example.com',
    'ssl': false
    'hostname': 'smtp.example.com',
    'port': 25,
    'username': 'username (optional)',
    'password': 'password (optional)'
  }
}
  • settings - Custom settings to override the Gaia default settings. These will be set before each test run but are not mandatory.
'settings': {
  '<setting>': <value>
}

When running with no SIM card or offline the timezone may not be automatically updated to match the local timezone. In that case you may need to force the timezone to match the desired timezone using settings in testvars.json which will set it during the test setup:

'settings': {
  'time.timezone': '<value>',
  'time.timezone.user-selected': '<value>'
}
  • prefs - Custom preferences to override the Gecko default preferences. These will be set before each test run but are not mandatory.
'prefs': {
  '<name>': <value>
}

Test data prerequisites

Occasionally a test will need data on the hardware that cannot be set during the test setup. The following tests need data set up before they can be run successfully:

  • test_ftu - Requires a single record/contact saved onto the SIM card to test the SIM contact import.

Writing tests

Test writing for Marionette Python tests is described here.

At the moment we don’t have a specific style guide. Please follow the prevailing style of the existing tests. Use them as a template for writing your tests. We follow PEP 8 for formatting, although we’re pretty lenient on the 80-character line length.

API usage

App manager

class gaiatest.gaia_test.GaiaApps(marionette)[source]
displayed_app
get_permission(app_name, permission_name)[source]
install(manifest_url)[source]
install_package(manifest_url)[source]
installed_apps
is_app_installed(app_name)[source]
kill(app)[source]
kill_all()[source]
launch(name, manifest_url=None, entry_point=None, switch_to_frame=True, launch_timeout=None)[source]
running_apps(include_system_apps=False)[source]

Returns a list of running apps Args:

include_system_apps: Includes otherwise hidden System apps in the list
Returns:
A list of GaiaApp objects representing the running apps.
set_permission(app_name, permission_name, value)[source]
set_permission_by_url(manifest_url, permission_name, value)[source]
switch_to_displayed_app()[source]
uninstall(manifest_url)[source]

Data manager

class gaiatest.gaia_test.GaiaData(marionette, testvars=None)[source]
active_telephony_state
add_notification(title, options=None)[source]
all_contacts
all_settings
bluetooth_disable()[source]
bluetooth_enable()[source]
bluetooth_is_discoverable
bluetooth_is_enabled
bluetooth_name
clear_notifications()[source]
clear_user_pref(name)[source]
connect_to_cell_data()[source]
connect_to_wifi(network=None)[source]
current_audio_channel
delete_all_call_log_entries()[source]

The call log needs to be open and focused in order for this to work.

delete_all_sms()[source]
delete_sim_contact(moz_contact_id, contact_type='adn')[source]
disable_cell_data()[source]
disable_cell_roaming()[source]
disable_wifi()[source]
enable_cell_roaming()[source]
enable_wifi()[source]
fm_radio_frequency
forget_all_networks()[source]
get_all_sms()[source]
get_bool_pref(name)[source]

Returns the value of a Gecko boolean pref, which is different from a Gaia setting.

get_char_pref(name)[source]

Returns the value of a Gecko string pref, which is different from a Gaia setting.

get_int_pref(name)[source]

Returns the value of a Gecko integer pref, which is different from a Gaia setting.

get_setting(name)[source]
insert_call_entry(call)[source]

The call log needs to be open and focused in order for this to work.

insert_contact(contact)[source]
insert_sim_contact(contact, contact_type='adn')[source]
is_antenna_available
is_cell_data_connected
is_cell_data_enabled
is_fm_radio_enabled
is_wifi_connected(network=None)[source]
is_wifi_enabled
kill_active_call()[source]
kill_conference_call()[source]
known_networks
media_files
music_files
picture_files
remove_all_contacts()[source]
sdcard_files(extension='')[source]
send_sms(number, message, skip_verification=False)[source]
set_bool_pref(name, value)[source]

Sets the value of a Gecko boolean pref, which is different from a Gaia setting.

set_char_pref(name, value)[source]

Sets the value of a Gecko string pref, which is different from a Gaia setting.

set_int_pref(name, value)[source]

Sets the value of a Gecko integer pref, which is different from a Gaia setting.

set_setting(name, value)[source]
set_time(date_number)[source]
set_volume(value)[source]
sim_contacts
video_files

Device manager

class gaiatest.gaia_test.GaiaDevice(marionette, testvars=None, manager=None)[source]
change_orientation(orientation)[source]

There are 4 orientation states which the phone can be passed in: portrait-primary(which is the default orientation), landscape-primary, portrait-secondary and landscape-secondary

has_mobile_connection
has_wifi
hold_home_button()[source]
hold_sleep_button()[source]
is_android_build
is_b2g_running
is_desktop_b2g
is_emulator
is_locked
is_online
is_screen_enabled
lock()[source]
press_release_volume_up_then_down_n_times(n_times)[source]
press_sleep_button()[source]
restart_b2g()[source]
screen_orientation
start_b2g(timeout=120)[source]
stop_b2g(timeout=5)[source]
touch_home_button()[source]
turn_screen_off()[source]
turn_screen_on()[source]
unlock()[source]
wait_for_b2g_ready(timeout=120)[source]

Environment

class gaiatest.environment.AttrDict[source]

Dictionary that allows accessing items as if they were attributes.

class gaiatest.environment.GaiaTestEnvironment(testvars)[source]

Test environment for Gaia.

email

Dictionary of e-mail protocol settings.

host

Dictionary of host specific values.

imei_numbers

List of IMEI numbers associated with the target instance.

phone_numbers

List of phone numbers associated with the target instance.

File manager

class gaiatest.file_manager.GaiaDeviceFileManager(device, log_level=40)[source]

File manager for Gaia instance running on a B2G device or emulator.

class gaiatest.file_manager.GaiaFileManager(device, log_level=40)[source]

Abstract file manager for Gaia.

copy_file(source, destination)[source]

Copy a file.

dir_exists(path)[source]

Return true if path exists and is a directory.

duplicate_file(path, count)[source]

Create duplicates of a file on the system and remove original.

file_exists(path)[source]

Return true if path exists and is a file.

list_items(path)[source]

List items in path.

make_dirs(filename)[source]

Make directory structure.

pull_file(path)[source]

Returns contents of file.

push_file(local_path, remote_path=None, count=1)[source]

Push a file to the system.

remove(path)[source]

Remove file or directory.

class gaiatest.file_manager.GaiaLocalFileManager(device, log_level=40)[source]

File manager for Gaia instance running locally such as desktop B2G.

Test cases

class gaiatest.gaia_test.GaiaTestCase(*args, **kwargs)[source]
cleanup_data()[source]
cleanup_gaia(full_reset=True)[source]
cleanup_storage()[source]

Remove all files from the device’s storage paths

connect_to_local_area_network()[source]
disable_all_network_connections()[source]
modify_prefs(prefs)[source]

Hook to modify the default preferences before they’re applied.

Parameters:prefs – dictionary of the preferences that would be applied.
Returns:modified dictionary of the preferences to be applied.

This method provides the ability for test cases to override the default preferences before they’re applied. To use it, define the method in your test class and return a modified dictionary of preferences:

class TestModifyPrefs(GaiaTestCase):

    def modify_prefs(self, prefs):
        prefs['foo'] = 'bar'
        return prefs

    def test_modify_prefs(self):
        self.assertEqual('bar', self.data_layer.get_char_pref('foo'))
modify_settings(settings)[source]

Hook to modify the default settings before they’re applied.

Parameters:settings – dictionary of the settings that would be applied.
Returns:modified dictionary of the settings to be applied.

This method provides the ability for test cases to override the default settings before they’re applied. To use it, define the method in your test class and return a modified dictionary of settings:

class TestModifySettings(GaiaTestCase):

    def modify_settings(self, settings):
        settings['foo'] = 'bar'
        return settings

    def test_modify_settings(self):
        self.assertEqual('bar', self.data_layer.get_setting('foo'))
pull_video_capture()[source]
push_resource(filename, remote_path=None, count=1)[source]
resource(filename)[source]
setUp()[source]
set_default_settings()[source]
start_video_capture()[source]
stop_video_capture()[source]
tearDown()[source]
wait_for_condition(method, timeout=None, message=None)[source]

Apps

Base

class gaiatest.apps.base.Base(marionette)[source]
DEFAULT_APP_HOSTNAME = '.gaiamobile.org'
DEFAULT_PROTOCOL = 'app://'
a11y_select(match_string)[source]
find_select_item(match_string)[source]
is_displayed
is_element_displayed(by, locator)[source]
is_element_present(by, locator)[source]
keyboard
launch(launch_timeout=None)[source]
manifest_url
select(match_string, tap_close=True)[source]
tap_element_from_system_app(element=None, add_statusbar_height=False, x=None, y=None)[source]
wait_for_select_closed(by, locator)[source]
wait_to_be_displayed()[source]
wait_to_not_be_displayed()[source]
class gaiatest.apps.base.PageRegion(marionette, element)[source]

Browser

Regions

Calendar

class gaiatest.apps.calendar.app.Calendar(marionette)[source]

Bases: gaiatest.apps.base.Base

class Event(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

a11y_click()[source]
location
title
class Calendar.Settings(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

wait_for_a11y_calendar_unchecked(timeout=None)[source]
wait_for_calendar_unchecked(timeout=None)[source]
Calendar.a11y_click_add_event_button()[source]
Calendar.a11y_click_close_settings()[source]
Calendar.a11y_click_create_account_back()[source]
Calendar.a11y_click_day_display_button()[source]
Calendar.a11y_click_day_view_event()[source]
Calendar.a11y_click_header(header, selector)[source]
Calendar.a11y_click_modify_account_back()[source]
Calendar.a11y_click_month_display_button()[source]
Calendar.a11y_click_other_day(next, previous)[source]
Calendar.a11y_click_settings()[source]
Calendar.a11y_click_week_display_button()[source]
Calendar.a11y_create_event(title)[source]
Calendar.a11y_wheel_to_next_month()[source]
Calendar.a11y_wheel_to_previous_month()[source]
Calendar.account(preset)[source]
Calendar.accounts
Calendar.current_month_day
Calendar.current_month_year
Calendar.displayed_events_in_day_view(data_date)[source]
Calendar.displayed_events_in_month_view()[source]
Calendar.displayed_events_in_week_view(data_date)[source]
Calendar.event(title)[source]
Calendar.event_list_date
Calendar.events
Calendar.flick_to_next_month()[source]
Calendar.flick_to_previous_month()[source]
Calendar.launch()[source]
Calendar.name = 'Calendar'
Calendar.settings
Calendar.tap_add_event_button()[source]
Calendar.tap_day_display_button()[source]
Calendar.tap_week_display_button()[source]
Calendar.wait_for_events(number_to_wait_for=1)[source]
Calendar.wait_for_new_event()[source]
Calendar.wait_fot_settings_drawer_animation()[source]

Regions

class gaiatest.apps.calendar.regions.event.NewEvent(marionette)[source]

Bases: gaiatest.apps.calendar.app.Calendar

a11y_click_close_button()[source]
a11y_click_save_event()[source]
a11y_fill_event_location(location)[source]
a11y_fill_event_title(title)[source]
fill_event_location(location)[source]
fill_event_title(title)[source]
tap_save_event()[source]
wait_for_panel_to_load()[source]

Clock

class gaiatest.apps.clock.app.Clock(marionette)[source]

Bases: gaiatest.apps.base.Base

launch()[source]
name = 'Clock'
switch_view(view_name)[source]

Regions

class gaiatest.apps.clock.regions.alarm.Alarm(marionette)[source]

Bases: gaiatest.apps.base.PageRegion

class AlarmItem(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

is_alarm_active
label
tap()[source]
tap_checkbox()[source]
time
wait_for_checkbox_to_change_state(value)[source]
Alarm.alarm_items
Alarm.banner_notification
Alarm.dismiss_banner()[source]
Alarm.tap_new_alarm()[source]

Contacts

class gaiatest.apps.contacts.app.Contacts(marionette)[source]

Bases: gaiatest.apps.base.Base

class Contact(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

a11y_click(return_class='ContactDetails')[source]
full_name
image_data_group
name
tap(return_class='ContactDetails')[source]
Contacts.a11y_click_new_contact()[source]
Contacts.contact(name)[source]
Contacts.contacts
Contacts.entry_point = 'contacts'
Contacts.is_favorites_list_displayed
Contacts.is_ice_list_icon_displayed
Contacts.is_no_contacts_message_displayed
Contacts.launch()[source]
Contacts.manifest_url = 'app://communications.gaiamobile.org/manifest.webapp'
Contacts.name = 'Contacts'
Contacts.open_ice_contact_list()[source]
Contacts.status_message
Contacts.switch_to_contacts_frame()[source]
Contacts.tap_confirm_delete()[source]
Contacts.tap_delete()[source]
Contacts.tap_export()[source]
Contacts.tap_new_contact()[source]
Contacts.tap_select_all()[source]
Contacts.tap_settings()[source]
Contacts.wait_for_contacts(number_to_wait_for=1)[source]
Contacts.wait_for_ice_contact_shown()[source]

Regions

class gaiatest.apps.contacts.regions.contact_details.ContactDetails(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_click_edit()[source]
add_remove_text
comments
full_name
image_style
phone_number
phone_numbers
tap_add_remove_favorite()[source]
tap_back()[source]
tap_edit()[source]
tap_phone_number()[source]
tap_send_sms()[source]
class gaiatest.apps.contacts.regions.contact_form.ContactForm(marionette)[source]

Bases: gaiatest.apps.base.Base

city
comment
country
email
family_name
given_name
name = 'Contacts'
phone
picture_style
street
tap_comment()[source]
tap_picture()[source]
type_city(value)[source]
type_comment(value)[source]
type_country(value)[source]
type_email(value)[source]
type_family_name(value)[source]
type_given_name(value)[source]
type_phone(value)[source]
type_street(value)[source]
type_zip_code(value)[source]
wait_for_image_to_load()[source]
zip_code
class gaiatest.apps.contacts.regions.contact_form.EditContact(marionette)[source]

Bases: gaiatest.apps.contacts.regions.contact_form.ContactForm

tap_cancel()[source]
tap_cancel_delete()[source]
tap_confirm_delete()[source]
tap_delete()[source]
tap_update(return_class='ContactDetails')[source]
wait_for_update_button_enabled()[source]
class gaiatest.apps.contacts.regions.contact_form.NewContact(marionette)[source]

Bases: gaiatest.apps.contacts.regions.contact_form.ContactForm

a11y_click_done(return_contacts=True)[source]
switch_to_new_contact_form()[source]
tap_done(return_contacts=True)[source]
wait_for_done(return_contacts=True)[source]
wait_for_new_contact_form_to_load()[source]
class gaiatest.apps.contacts.regions.contact_import_picker.ContactImportPicker(marionette)[source]

Bases: gaiatest.apps.base.Base

tap_first_friend()[source]
tap_import_button(wait_for_import=True)[source]
tap_select_all()[source]
class gaiatest.apps.contacts.regions.gmail.GmailLogin(marionette)[source]

Bases: gaiatest.apps.base.Base

gmail_login(user, passwd)[source]
switch_to_gmail_login_frame()[source]
tap_grant_access()[source]
class gaiatest.apps.contacts.regions.settings_form.ConfirmationView(marionette)[source]

Bases: gaiatest.apps.base.Base

error_message
class gaiatest.apps.contacts.regions.settings_form.SettingsForm(marionette)[source]

Bases: gaiatest.apps.base.Base

disable_order_by_last_name()[source]
enable_order_by_last_name()[source]
gmail_imported_contacts
is_error_message_displayed
is_gmail_import_enabled
is_gmail_import_service_in_error
is_outlook_import_enabled
is_outlook_import_service_in_error
tap_back_from_import_contacts()[source]
tap_delete_contacts()[source]
tap_done()[source]
tap_export_contacts()[source]
tap_export_to_sd()[source]
tap_export_to_sim()[source]
tap_import_contacts()[source]
tap_import_from_gmail()[source]
tap_import_from_sdcard()[source]
tap_import_from_sim()[source]
tap_set_ice_contact()[source]

Cost control

class gaiatest.apps.cost_control.app.CostControl(marionette)[source]

Bases: gaiatest.apps.base.Base

disable_mobile_data_tracking()[source]
enable_wifi_data_tracking()[source]
is_mobile_data_tracking_on
is_wifi_data_tracking_on
mobile_data_usage_figure
name = 'Usage'
run_ftu_accepting_defaults()[source]

Complete the 3 steps of the Usage app’s FTU accepting all default values.

switch_to_ftu()[source]
tap_settings()[source]
wifi_data_usage_figure

Regions

class gaiatest.apps.cost_control.regions.ftu_step1.FTUStep1(marionette)[source]

Bases: gaiatest.apps.base.Base

tap_next()[source]
class gaiatest.apps.cost_control.regions.ftu_step2.FTUStep2(marionette)[source]

Bases: gaiatest.apps.cost_control.app.CostControl

select_reset_report_value(value)[source]
tap_next()[source]
class gaiatest.apps.cost_control.regions.ftu_step3.FTUStep3(marionette)[source]

Bases: gaiatest.apps.cost_control.app.CostControl

enable_data_alert()[source]
is_data_alert_switch_checked
select_when_use_is_above_unit_and_value(unit, value)[source]
tap_lets_go()[source]
class gaiatest.apps.cost_control.regions.settings.Settings(marionette)[source]

Bases: gaiatest.apps.base.Base

enable_data_alert_switch()[source]
is_data_alert_switch_checked
reset_mobile_usage()[source]
reset_wifi_usage()[source]
select_when_use_is_above_unit_and_value(unit, value)[source]
switch_to_settings_iframe()[source]
tap_confirm_reset()[source]
tap_done()[source]

Email

class gaiatest.apps.email.app.Email(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_click_manual_setup()[source]
a11y_navigate_to_manual_setup(name, email)[source]
basic_setup_email(name, email, password)[source]
delete_email_account(index)[source]
class email_exists(app, subject)[source]

Bases: object

Email.emails_list_header_locator = ('css selector', '.msg-list-header')
Email.header
Email.mails
Email.name = 'E-Mail'
Email.setup_IMAP_email(imap, smtp)[source]
Email.setup_active_sync_email(active_sync)[source]
Email.tap_email_subject(subject)[source]
Email.tap_manual_setup()[source]
Email.toolbar
Email.wait_for_email(subject, timeout=120)[source]
Email.wait_for_emails_to_sync()[source]
Email.wait_for_message_list()[source]
Email.wait_for_search_textbox_displayed()[source]
class gaiatest.apps.email.app.Header(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

a11y_click_menu()[source]
is_compose_visible
is_menu_visible
label
tap_compose()[source]
tap_menu()[source]
class gaiatest.apps.email.app.Message(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

scroll_to_message()[source]
senders_email
subject
class gaiatest.apps.email.app.ToolBar(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_click_settings()[source]
is_a11y_visible
is_edit_visible
is_refresh_visible
is_search_visible
is_settings_visible
is_visible
tap_edit()[source]
tap_refresh()[source]
tap_settings()[source]

Regions

class gaiatest.apps.email.regions.new_email.NewEmail(marionette)[source]

Bases: gaiatest.apps.base.Base

tap_send()[source]
type_bcc(value)[source]
type_body(value)[source]
type_cc(value)[source]
type_subject(value)[source]
type_to(value)[source]
class gaiatest.apps.email.regions.read_email.ReadEmail(marionette)[source]

Bases: gaiatest.apps.base.Base

approve_delete()[source]
body
cancel_delete()[source]
cancel_move()[source]
cancel_reply()[source]
manifest_url = 'app://email.gaiamobile.org/manifest.webapp'
senders_email
subject
tap_delete_button()[source]
tap_mark_button()[source]
tap_move_button()[source]
tap_reply_button()[source]
tap_star_button()[source]
wait_for_senders_email_displayed()[source]
class gaiatest.apps.email.regions.settings.DeleteConfirmation(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_click_delete()[source]
tap_delete()[source]
class gaiatest.apps.email.regions.settings.EmailAccountSettings(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_click_delete()[source]
tap_delete()[source]
class gaiatest.apps.email.regions.settings.Settings(marionette)[source]

Bases: gaiatest.apps.base.Base

class Account(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

a11y_click()[source]
tap()[source]
Settings.email_accounts
class gaiatest.apps.email.regions.setup.ManualSetupEmail(marionette)[source]

Bases: gaiatest.apps.base.Base

check_for_emails_interval(value)[source]
name = 'E-Mail'
select_account_type(value)[source]
tap_account_prefs_next()[source]
tap_continue()[source]
tap_next()[source]
type_activesync_hostname(value)[source]
type_activesync_name(value)[source]
type_email(value)[source]
type_imap_hostname(value)[source]
type_imap_name(value)[source]
type_imap_password(value)[source]
type_imap_port(value)[source]
type_name(value)[source]
type_password(value)[source]
type_smtp_hostname(value)[source]
type_smtp_name(value)[source]
type_smtp_password(value)[source]
type_smtp_port(value)[source]
wait_for_setup_complete()[source]
class gaiatest.apps.email.regions.setup.SetupEmail(marionette)[source]

Bases: gaiatest.apps.base.Base

tap_account_prefs_next()[source]
tap_continue()[source]
tap_next()[source]
type_email(value)[source]
type_name(value)[source]
wait_for_setup_complete()[source]

Emergency call

class gaiatest.apps.emergency_call.app.EmergencyCall(marionette)[source]

Bases: gaiatest.apps.base.Base

is_emergency_call_only_title_displayed
is_emergency_dialer_keypad_displayed
keypad
switch_to_emergency_call_frame()[source]

FM radio

class gaiatest.apps.fmradio.app.FmRadio(marionette)[source]

Bases: gaiatest.apps.base.Base

class FavoriteChannel(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

remove()[source]
text
FmRadio.airplane_warning_text
FmRadio.airplane_warning_title
FmRadio.favorite_channels
FmRadio.flick_frequency_dialer_up()[source]
FmRadio.frequency
FmRadio.is_power_button_on
FmRadio.launch(airplane_mode=False)[source]
FmRadio.manifest_url = 'app://fm.gaiamobile.org/manifest.webapp'
FmRadio.name = 'FM Radio'
FmRadio.tap_add_favorite()[source]
FmRadio.tap_next()[source]
FmRadio.tap_power_button()[source]
FmRadio.tap_previous()[source]
FmRadio.wait_for_radio_off()[source]

First time use

class gaiatest.apps.ftu.app.Ftu(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_click_language(language)[source]
a11y_click_next()[source]
a11y_click_next_to_cell_data_section()[source]
a11y_click_next_to_finish_section()[source]
a11y_click_next_to_firefox_accounts_section()[source]
a11y_click_next_to_geolocation_section()[source]
a11y_click_next_to_import_contacts_section()[source]
a11y_click_next_to_privacy_browser_section()[source]
a11y_click_next_to_timezone_section()[source]
a11y_click_next_to_welcome_browser_section()[source]
a11y_click_next_to_wifi_section()[source]
a11y_click_skip_tour()[source]
a11y_connect_to_wifi(network_ssid, password, key_management=None)[source]
a11y_disable_geolocation()[source]
a11y_enable_data()[source]
a11y_set_timezone_city(city)[source]
a11y_set_timezone_continent(continent)[source]
connect_to_wifi(network_ssid, password, key_management=None)[source]
count_imported_contacts
disable_geolocation()[source]
enable_data()[source]
enable_metrics_basic()[source]
enable_metrics_enhanced()[source]
enable_metrics_none()[source]
enter_email_address(email)[source]
find_wifi_network(network_ssid)[source]
is_geolocation_enabled
is_lets_go_button_visible
is_metrics_basic_enabled
is_metrics_enhanced_enabled
is_metrics_none_enabled
is_take_tour_button_visible
languages_list
launch()[source]
name = 'FTU'
run_ftu_setup_with_default_values()[source]
selected_language
set_timezone_city(city)[source]
set_timezone_continent(continent)[source]
step1_header_text
step2_header_text
step3_header_text
step4_header_text
step5_header_text
step6_header_text
tap_back()[source]
tap_import_from_sim()[source]
tap_language(language)[source]
tap_lets_go_button()[source]
tap_next()[source]
tap_next_to_cell_data_section()[source]
tap_next_to_finish_section()[source]
tap_next_to_firefox_accounts_section()[source]
tap_next_to_geolocation_section()[source]
tap_next_to_import_contacts_section()[source]
tap_next_to_late_customization_section()[source]
tap_next_to_privacy_browser_section()[source]
tap_next_to_timezone_section()[source]
tap_next_to_welcome_browser_section()[source]
tap_next_to_wifi_section()[source]
tap_skip_tour()[source]
tap_take_tour()[source]
tap_tour_next()[source]
timezone_title
wait_for_contacts_imported()[source]
wait_for_finish_tutorial_section()[source]
wait_for_networks_available()[source]

Gallery

class gaiatest.apps.gallery.app.Gallery(marionette)[source]

Bases: gaiatest.apps.base.Base

class Thumbnail(marionette, element, index)[source]

Bases: gaiatest.apps.base.PageRegion

absolute_image_size

The dimensions of the image on disk, is drawn from the image’s metadata

tap()[source]
Gallery.gallery_items_number
Gallery.launch(empty=False)[source]
Gallery.name = 'Gallery'
Gallery.switch_to_camera()[source]
Gallery.switch_to_multiple_selection_view()[source]
Gallery.thumbnails
Gallery.wait_for_files_to_load(files_number)[source]
Gallery.wait_for_overlay_to_show()[source]
Gallery.wait_for_thumbnail_view_to_load()[source]
Gallery.wait_for_thumbnails_to_load()[source]

Regions

class gaiatest.apps.gallery.regions.crop_view.CropView(marionette)[source]

Bases: gaiatest.apps.base.Base

tap_crop_done()[source]
class gaiatest.apps.gallery.regions.edit_photo.EditPhoto(marionette)[source]

Bases: gaiatest.apps.base.Base

class Effect(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

tap()[source]
EditPhoto.effects
EditPhoto.tap_edit_crop_button()[source]
EditPhoto.tap_edit_effects_button()[source]
EditPhoto.tap_edit_save_button()[source]
EditPhoto.tap_edit_tool_apply_button()[source]
EditPhoto.tap_portrait_crop()[source]
class gaiatest.apps.gallery.regions.fullscreen_image.FullscreenImage(marionette)[source]

Bases: gaiatest.apps.base.Base

This is not the actual image file - it is a blob of the image file in storage

current_image_frame
current_image_size_height
current_image_size_width
current_image_source
double_tap_image()[source]
flick_to_next_image()[source]
flick_to_previous_image()[source]
go_back()[source]
is_photo_toolbar_displayed
photo_toolbar_options
photo_toolbar_width
tap_confirm_deletion_button()[source]
tap_delete_button()[source]
tap_edit_button()[source]
tap_switch_to_camera()[source]

Homescreen

class gaiatest.apps.homescreen.app.Homescreen(marionette)[source]

Bases: gaiatest.apps.base.Base

class GaiaAppIcon(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

activate_edit_mode()[source]
is_app_installed
is_displayed
manifest_url
move_to(html_element)[source]
tap_icon()[source]
Homescreen.app_elements
Homescreen.bookmark(bookmark_title)[source]
Homescreen.delete_app(app_manifest)[source]
Homescreen.installed_app(app_manifest)[source]
Homescreen.is_app_installed(app_manifest)[source]

Checks whether app is installed

Homescreen.is_at_topmost_position
Homescreen.move_app_to_position(app_position, to_position)[source]
Homescreen.name = 'Default Home Screen'
Homescreen.number_of_columns
Homescreen.scroll_to_icon(icon_position=0)[source]
Homescreen.visible_apps
Homescreen.wait_for_app_icon_not_present(app_manifest)[source]
Homescreen.wait_for_app_icon_present(app_manifest)[source]
Homescreen.wait_for_bookmark_icon_not_present(bookmark_title)[source]
Homescreen.wait_for_number_of_apps(number_of_apps=1)[source]

Regions

class gaiatest.apps.homescreen.regions.bookmark_menu.BookmarkMenu(marionette)[source]

Bases: gaiatest.apps.base.Base

manifest_url = 'app://bookmark.gaiamobile.org/manifest.webapp'
name = 'Bookmark'
tap_add_bookmark_to_home_screen_dialog_button()[source]
type_bookmark_title(value)[source]
class gaiatest.apps.homescreen.regions.confirm_dialog.ConfirmDialog(marionette)[source]

Bases: gaiatest.apps.base.Base

tap_confirm(bookmark=False)[source]
class gaiatest.apps.homescreen.regions.confirm_install.ConfirmInstall(marionette)[source]

Bases: gaiatest.apps.base.Base

tap_confirm()[source]
class gaiatest.apps.homescreen.regions.permission_dialog.PermissionDialog(marionette)[source]

Bases: gaiatest.apps.base.Base

permission_dialog_message
tap_to_confirm_permission()[source]
tap_to_dismiss_permission()[source]
wait_for_permission_dialog_displayed()[source]

Keyboard

class gaiatest.apps.keyboard.app.Keyboard(marionette)[source]

Bases: gaiatest.apps.base.Base

There are two underlying strategies in this class;

  • send() method which uses logic to traverse the keyboard to type the string sent to it. Send should be used in tests where the layout of the keyboard is not tested and only string input is important
  • tap_x() or anything not send() methods which do not use logic to change keyboard panels. Tap should be used where the keyboard is expected to open with that key visible

The methods in this class employ a lot of aggressive frame switching to the keyboard and back to the displayed app because it predominantly acts as a utility class and thus it works best when the main focus of the test is on the web app rather than the keyboard itself.

a11y_backspace_key_name
a11y_backspace_key_role
a11y_candidate_panel_name
a11y_dismiss_suggestions_button_name
a11y_dismiss_suggestions_button_role
a11y_enter_key_name
a11y_enter_key_role
a11y_first_predictive_word_click()[source]
a11y_first_predictive_word_name
a11y_first_predictive_word_role
a11y_space_key_name
a11y_space_key_role
a11y_suggestions_container_role
choose_extended_character(long_press_key, selection, movement=True)[source]
current_keyboard
dismiss()[source]
enable_caps_lock()[source]
is_keyboard_displayed
keyboard_table = ['english', 'dvorak', 'otherlatins', 'cyrillic', 'arabic', 'hebrew', 'zhuyin', 'pinyin', 'greek', 'japanese', 'portuguese', 'spanish']
lookup_table = {'!': '\xc2\xa1', '$': '\xe2\x82\xac\xc2\xa3\xc2\xa5', '0': '\xc2\xba', '?': '\xc2\xbf', 'A': '\xc3\x81\xc3\x80\xc3\x82\xc3\x84\xc3\x85\xc3\x83\xc4\x80\xc3\x86', 'C': '\xc3\x87\xc4\x86\xc4\x8c', 'E': '\xc3\x89\xc3\x88\xc3\x8a\xc3\x8b\xc4\x92\xc4\x98\xe2\x82\xac\xc6\x90', 'I': '\xc4\xae\xc4\xaa\xc3\x8e\xc3\x8c\xc3\x8d\xc3\x8f', 'L': '\xc2\xa3\xc5\x81', 'O': '\xc6\x9f\xc3\x98\xc5\x92\xc5\x8c\xc3\x94\xc3\x92\xc3\x93\xc3\x96', 'N': '\xc5\x83\xc3\x91', 'S': '\xc5\x9a\xc5\xa0\xc5\x9e', 'U': '\xc5\xaa\xc3\x9b\xc3\x99\xc3\x9a\xc3\x9c', 'Y': '\xc2\xa5\xc5\xb8', 'Z': '\xc5\xbd\xc5\xb9\xc5\xbb', 'a': '\xc3\xa1\xc3\xa0\xc3\xa2\xc3\xa4\xc3\xa5\xc3\xa3\xc4\x81\xc3\xa6', 'c': '\xc3\xa7\xc4\x87\xc4\x8d', 'e': '\xc3\xa9\xc3\xa8\xc3\xaa\xc3\xab\xc4\x93\xc4\x99\xe2\x82\xac\xc9\x9b', 'i': '\xc4\xaf\xc4\xab\xc3\xae\xc3\xac\xc3\xad\xc3\xaf', 'l': '\xc2\xa3\xc5\x82', 'o': '\xc9\xb5\xc3\xb8\xc5\x93\xc5\x8d\xc3\xb4\xc3\xb2\xc3\xb3\xc3\xb6', 'n': '\xc5\x84\xc3\xb1', 's': '\xc3\x9f\xc5\x9b\xc5\xa1$', 'u': '\xc5\xab\xc3\xbb\xc3\xb9\xc3\xba\xc3\xbc', 'y': '\xc2\xa5\xc3\xbf', 'z': '\xc5\xbe\xc5\xba\xc5\xbc'}
name = 'Keyboard'
send(string)[source]
switch_keyboard_language(lang_code)[source]
switch_to_keyboard(focus=False)[source]
tap_backspace()[source]
tap_dotcom()[source]
tap_enter()[source]
tap_first_predictive_word()[source]
tap_keyboard_language_key()[source]
tap_shift()[source]
tap_space()[source]
tap_suggestion(word)[source]

Lockscreen

class gaiatest.apps.lockscreen.app.LockScreen(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_click_camera_button()[source]
a11y_click_unlock_button()[source]
notifications
switch_to_frame()[source]
time
time_in_datetime
unlock()[source]
unlock_to_camera()[source]
unlock_to_emergency_call()[source]
unlock_to_homescreen_using_passcode(passcode)[source]
unlock_to_passcode_pad()[source]
wait_for_lockscreen_not_visible()[source]
wait_for_notification()[source]
class gaiatest.apps.lockscreen.app.Notification(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

content
is_visible
title

Regions

class gaiatest.apps.lockscreen.regions.passcode_pad.PasscodePad(marionette)[source]

Bases: gaiatest.apps.base.Base

tap_emergency_call()[source]
type_passcode(passcode)[source]

Messages

class gaiatest.apps.messages.app.Messages(marionette)[source]

Bases: gaiatest.apps.base.Base

class Thread(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

choose()[source]
is_draft_icon_displayed
open()[source]
Messages.create_new_message(recipients, message)[source]
Messages.delete_selection()[source]
Messages.draft_threads
Messages.enter_select_mode()[source]
Messages.is_in_select_mode
Messages.launch()[source]
Messages.manifest_url = 'app://sms.gaiamobile.org/manifest.webapp'
Messages.name = 'Messages'
Messages.tap_create_new_message()[source]
Messages.tap_delete_button()[source]
Messages.tap_first_received_message()[source]
Messages.tap_settings()[source]
Messages.tap_thread_options()[source]
Messages.threads
Messages.wait_for_banner_to_hide()[source]
Messages.wait_for_header_to_fully_appear()[source]
Messages.wait_for_message_list()[source]
Messages.wait_for_message_received(timeout=180)[source]

Regions

class gaiatest.apps.messages.regions.activities.Activities(marionette)[source]

Bases: gaiatest.apps.base.Base

confirm_delete_message()[source]
tap_add_subject()[source]
tap_add_to_contact()[source]
tap_create_new_contact()[source]
tap_delete_message()[source]
tap_forward_message()[source]
tap_report()[source]
tap_settings()[source]
class gaiatest.apps.messages.regions.message_thread.Message(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

has_attachments
id
long_press_message()[source]
open_report()[source]
tap_attachment()[source]
text
class gaiatest.apps.messages.regions.message_thread.MessageThread(marionette)[source]

Bases: gaiatest.apps.base.Base

all_messages
header_text
received_messages
sent_messages
tap_back_button()[source]
tap_call()[source]
tap_header()[source]
wait_for_received_messages(interval=5, timeout=300)[source]
class gaiatest.apps.messages.regions.messaging_settings.MessagingSettings(marionette)[source]

Bases: gaiatest.apps.base.Base

is_messaging_settings_displayed()[source]
class gaiatest.apps.messages.regions.new_message.NewMessage(marionette)[source]

Bases: gaiatest.apps.messages.app.Messages

first_recipient_name
first_recipient_number_attribute
go_back()[source]
has_attachment
is_recipient_name_editable
is_send_button_enabled
message
number_of_recipients
recipient_css_class
recipients
save_as_draft()[source]
tap_add_recipient()[source]
tap_attachment()[source]
tap_image_attachment()[source]
tap_message()[source]
tap_options()[source]
tap_recipient_name()[source]
tap_recipient_section()[source]
tap_send(timeout=120)[source]
type_message(value)[source]
type_phone_number(value)[source]
wait_for_message_input_displayed()[source]
wait_for_recipients_displayed()[source]
wait_for_resizing_to_finish()[source]
wait_for_subject_input_displayed()[source]

Music

class gaiatest.apps.music_oga.app.Music(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_click_albums_tab()[source]
empty_music_text
empty_music_title
launch()[source]
manifest_url = 'app://music-oga.gaiamobile.org/manifest.webapp'
name = 'Music OGA'
tabs
tap_albums_tab()[source]
tap_artists_tab()[source]
tap_songs_tab()[source]
views
wait_for_empty_message_to_load()[source]
wait_for_music_tiles_displayed()[source]
wait_for_view_displayed(view_name)[source]

Regions

class gaiatest.apps.music.regions.list_view.AlbumsView(marionette)[source]

Bases: gaiatest.apps.music.regions.list_view.ListView

class gaiatest.apps.music.regions.list_view.ArtistsView(marionette)[source]

Bases: gaiatest.apps.music.regions.list_view.ListView

class gaiatest.apps.music.regions.list_view.ListView(marionette)[source]

Bases: gaiatest.apps.base.Base

media
class gaiatest.apps.music.regions.list_view.Media(marionette, element, _active_view_locator)[source]

Bases: gaiatest.apps.base.PageRegion

a11y_click_first_album()[source]
switch_to_active_view()[source]
tap_first_album()[source]
tap_first_artist()[source]
tap_first_song()[source]
class gaiatest.apps.music.regions.list_view.SongsView(marionette)[source]

Bases: gaiatest.apps.music.regions.list_view.ListView

class gaiatest.apps.music.regions.player_view.PlayerView(marionette)[source]

Bases: gaiatest.apps.base.Base

is_player_playing()[source]
player_current_timestamp
player_elapsed_time
star_rating
tap_cover_in_player_view()[source]
tap_forward()[source]
tap_play()[source]
tap_share_button()[source]
tap_star(rate)[source]

give rating. (After tapping the cover to make the ratings overlay appear)

class gaiatest.apps.music.regions.sublist_view.AlbumSublistView(marionette)[source]

Bases: gaiatest.apps.music.regions.sublist_view.SublistView

class gaiatest.apps.music.regions.sublist_view.ArtistSublistView(marionette)[source]

Bases: gaiatest.apps.music.regions.sublist_view.SublistView

class gaiatest.apps.music.regions.sublist_view.SublistView(marionette)[source]

Bases: gaiatest.apps.base.Base

switch_to_active_view()[source]
tap_first_song()[source]
wait_sublist_view_draw()[source]

Persona

class gaiatest.apps.persona.app.Persona(marionette)[source]

Bases: gaiatest.apps.base.Base

login(email, password)[source]
switch_to_persona_frame()[source]
tap_continue()[source]
tap_returning()[source]
type_email(value)[source]
type_password(value)[source]
wait_for_persona_to_load()[source]

Phone

class gaiatest.apps.phone.app.Phone(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_click_call_log_toolbar_button()[source]
a11y_click_contacts()[source]
a11y_click_keypad_toolbar_button()[source]
a11y_hang_up()[source]
a11y_make_call(phone_number)[source]
a11y_make_call_and_hang_up(phone_number)[source]

Just makes a call and hangs up using the screen reader. Does not do any assertions.

call_log
call_screen
confirmation_dialog_text
entry_point = 'dialer'
keypad
launch()[source]
make_call_and_hang_up(phone_number)[source]

Just makes a call and hangs up. Does not do any assertions.

manifest_url = 'app://communications.gaiamobile.org/manifest.webapp'
name = 'Phone'
tap_call_log_toolbar_button()[source]
tap_contacts()[source]
tap_keypad_toolbar_button()[source]
wait_for_confirmation_dialog()[source]

Regions

class gaiatest.apps.phone.regions.attention_screen.AttentionScreen(marionette)[source]

Bases: gaiatest.apps.base.Base

message
class gaiatest.apps.phone.regions.call_log.CallLog(marionette)[source]

Bases: gaiatest.apps.phone.app.Phone

a11y_click_all_calls_tab()[source]
call_list
groups_list
header_text
is_all_calls_tab_selected
is_missed_calls_tab_selected
no_logs_message
tap_all_calls_tab()[source]
tap_delete_button()[source]
tap_delete_confirmation_button()[source]
tap_edit_button()[source]
tap_missed_calls_tab()[source]
tap_select_all_button()[source]
class gaiatest.apps.phone.regions.call_log.LogEntries(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

call_type
is_checked
phone_number
retry_count
class gaiatest.apps.phone.regions.call_log.LogGroups(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

group_calls
header_text
class gaiatest.apps.phone.regions.call_screen.CallScreen(marionette)[source]

Bases: gaiatest.apps.phone.app.Phone

MAX_NUMBER_OF_DISPLAYED_DIGITS = 22
a11y_click_hang_up()[source]
a11y_click_keypad_hang_up()[source]
a11y_click_keypad_visibility_button()[source]
a11y_hang_up()[source]
a11y_keypad_hang_up()[source]
answer_call()[source]
answer_call_while_on_call()[source]
calling_contact_information
conference_label
contact_background_style
hang_up()[source]
incoming_calling_contact
incoming_calling_contact_while_on_call
merge_calls()[source]
outgoing_calling_contact
reject_call()[source]
switch_to_call_screen_frame()[source]
via_sim
wait_for_incoming_call()[source]
wait_for_incoming_call_while_on_call()[source]
wait_for_outgoing_call()[source]
class gaiatest.apps.phone.regions.keypad.AddNewNumber(marionette)[source]

Bases: gaiatest.apps.base.Base

tap_add_to_existing_contact()[source]
tap_create_new_contact()[source]
class gaiatest.apps.phone.regions.keypad.BaseKeypad(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_call_number(value)[source]
a11y_click_call_button(switch_to_call_screen=True)[source]
a11y_dial_phone_number(value)[source]
call_number(value)[source]
clear_phone_number()[source]
dial_phone_number(value)[source]
phone_number
tap_call_button(switch_to_call_screen=True)[source]
class gaiatest.apps.phone.regions.keypad.Keypad(marionette)[source]

Bases: gaiatest.apps.phone.regions.keypad.BaseKeypad, gaiatest.apps.phone.app.Phone

suggested_name
suggested_phone_number
tap_add_contact()[source]
tap_search_popup()[source]
wait_for_phone_number_ready()[source]
wait_for_search_popup_visible()[source]

Settings

class gaiatest.apps.settings.app.Settings(marionette)[source]

Bases: gaiatest.apps.base.Base

application_storage_menu_item_description
battery_menu_item_description
bluetooth_menu_item_description
cell_data_menu_item_description
current_view
disable_airplane_mode()[source]
disable_gps()[source]
enable_airplane_mode()[source]
enable_gps()[source]
header_text
is_airplane_mode_displayed
is_cell_data_menu_visible
is_wifi_menu_visible
language_menu_item_description
launch()[source]
media_storage_menu_item_description
name = 'Settings'
open_accessibility()[source]
open_achievements()[source]
open_addons()[source]
open_app_permissions()[source]
open_application_storage()[source]
open_battery()[source]
open_bluetooth()[source]
open_browsing_privacy()[source]
open_call()[source]
open_cell_and_data()[source]
open_cell_and_data_dual_sim()[source]
open_date_and_time()[source]
open_developer()[source]
open_device_info()[source]
open_display()[source]
open_do_not_track()[source]
open_downloads()[source]
open_findmydevice()[source]
open_firefox_accounts()[source]
open_help()[source]
open_homescreen()[source]
open_improve()[source]
open_internet_sharing()[source]
open_keyboard()[source]
open_language()[source]
open_media_storage()[source]
open_message()[source]
open_navigation()[source]
open_notification()[source]
open_privacy_controls()[source]
open_screen_lock()[source]
open_sim_manager()[source]
open_sound()[source]
open_themes()[source]
open_usb_storage()[source]
open_wifi()[source]
return_to_prev_menu(parent_view, exit_view)[source]
screen_element
screen_lock_menu_item_description
switch_to_settings_app()[source]
title
usb_storage_menu_item_description
wait_for_airplane_mode_ready()[source]
wait_until_wifi_is_connected_to(ssid)[source]
wifi_menu_item_description

Regions

class gaiatest.apps.settings.regions.accessibility.Accessibility(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_open_color_settings()[source]
a11y_open_screenreader_settings()[source]
open_audio_settings()[source]
open_color_settings()[source]
open_input_settings()[source]
screen_element
class gaiatest.apps.settings.regions.accessibility.AccessibilityAudio(marionette)[source]

Bases: gaiatest.apps.base.Base

screen_element
class gaiatest.apps.settings.regions.accessibility.AccessibilityColors(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_toggle_filters()[source]
a11y_toggle_grayscale()[source]
a11y_toggle_invert()[source]
a11y_toggle_switch(switch)[source]
check_switch_for_a11y_state(state, switch)[source]
grayscale_switch_hidden
grayscale_switch_visible
invert_switch_hidden
invert_switch_visible
screen_element
toggle_filters()[source]
class gaiatest.apps.settings.regions.accessibility.AccessibilityInput(marionette)[source]

Bases: gaiatest.apps.base.Base

screen_element
tap_change_delay()[source]
tap_confirm_delay()[source]
class gaiatest.apps.settings.regions.accessibility.AccessibilityScreenreader(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_toggle_captions()[source]
class gaiatest.apps.settings.regions.battery.Battery(marionette)[source]

Bases: gaiatest.apps.base.Base

confirm_turnon_options()[source]
enable_power_save_mode()[source]
screen_element
tap_turn_on_auto()[source]
class gaiatest.apps.settings.regions.bluetooth.Bluetooth(marionette)[source]

Bases: gaiatest.apps.base.PageRegion

device_name
disable_bluetooth()[source]
enable_bluetooth()[source]
enable_visible_to_all()[source]
is_bluetooth_enabled
is_visible_enabled
refresh_root_element()[source]
screen_element
tap_confirm_unpair_device()[source]
tap_device(name)[source]
tap_rename_my_device()[source]
tap_search_for_devices()[source]
tap_update_device_name_ok()[source]
type_phone_name(name)[source]
class gaiatest.apps.settings.regions.cell_data.CellData(marionette)[source]

Bases: gaiatest.apps.base.Base

carrier_name
data_prompt
enable_data()[source]
enable_roaming()[source]
is_data_toggle_checked
is_roaming_toggle_checked
screen_element
tap_sim_1_setting()[source]
class gaiatest.apps.settings.regions.cell_data.CellDataDualSim(marionette)[source]

Bases: gaiatest.apps.settings.regions.cell_data.CellData

class gaiatest.apps.settings.regions.cell_data_prompt.CellDataPrompt(marionette)[source]

Bases: gaiatest.apps.base.PageRegion

turn_on()[source]
class gaiatest.apps.settings.regions.device_info.DeviceInfo(marionette)[source]

Bases: gaiatest.apps.base.Base

class MoreInfo(marionette)[source]

Bases: gaiatest.apps.base.PageRegion

build_id
build_number
git_commit_hash
git_commit_timestamp
hardware_revision
iccid
imei1
imei2
mac_address
os_version
platform_version
refresh_root_element()[source]
screen_element
update_channel
DeviceInfo.confirm_reset(response=True)[source]
DeviceInfo.exit_update_frequency()[source]
DeviceInfo.legal_screen_element
DeviceInfo.model
DeviceInfo.moreinfo_screen_element
DeviceInfo.notice_screen_element
DeviceInfo.phone_number
DeviceInfo.privacy_screen_element
DeviceInfo.rights_screen_element
DeviceInfo.screen_element
DeviceInfo.software
DeviceInfo.source_screen_element
DeviceInfo.tap_more_info()[source]
DeviceInfo.tap_obtaining_source_code()[source]
DeviceInfo.tap_open_source_notices()[source]
DeviceInfo.tap_reset_phone()[source]
DeviceInfo.tap_update_frequency()[source]
DeviceInfo.tap_your_privacy()[source]
DeviceInfo.tap_your_rights()[source]
class gaiatest.apps.settings.regions.display.Display(marionette)[source]

Bases: gaiatest.apps.base.Base

screen_element
tap_timeout_confirmation()[source]
tap_timeout_selector()[source]
class gaiatest.apps.settings.regions.do_not_track.DoNotTrack(marionette)[source]

Bases: gaiatest.apps.base.Base

screen_element
tap_allow_tracking()[source]
tap_disallow_tracking()[source]
tap_do_not_have_pref_on_tracking()[source]
class gaiatest.apps.settings.regions.keyboard.BuiltInKeyBoard(marionette)[source]

Bases: gaiatest.apps.base.Base

manifest_url = 'app://keyboard.gaiamobile.org/manifest.webapp'
tap_exit()[source]
tap_user_dict_exit()[source]
tap_user_dictionary()[source]
class gaiatest.apps.settings.regions.keyboard.Keyboard(marionette)[source]

Bases: gaiatest.apps.base.Base

is_built_in_keyboard_present(language)[source]
screen_element
tap_add_more_keyboards()[source]
tap_built_in_keyboards()[source]
wait_for_built_in_keyboard(language)[source]
wait_until_page_ready()[source]
class gaiatest.apps.settings.regions.keyboard.KeyboardAddMoreKeyboards(marionette)[source]

Bases: gaiatest.apps.base.Base

go_back()[source]
screen_element
select_language(language)[source]
class gaiatest.apps.settings.regions.language.Language(marionette)[source]

Bases: gaiatest.apps.base.Base

close_get_language()[source]
close_select_language()[source]
current_language
go_back()[source]
open_get_language()[source]
open_select_language()[source]
screen_element
select_language(language)[source]
wait_for_languages_to_load()[source]
class gaiatest.apps.settings.regions.media_storage.MediaStorage(marionette)[source]

Bases: gaiatest.apps.base.Base

confirm_select_media_location()[source]
default_media_location
external_storage0
internal_storage
pick_media_location(location)[source]
screen_element
tap_select_media_location()[source]
class gaiatest.apps.settings.regions.screen_lock.ScreenLock(marionette)[source]

Bases: gaiatest.apps.base.PageRegion

create_passcode(passcode)[source]
enable_lockscreen()[source]
enable_passcode_lock()[source]
passcode_screen_element
screen_element
class gaiatest.apps.settings.regions.sim_manager.SimManager(marionette)[source]

Bases: gaiatest.apps.base.Base

enable_sim_pin()[source]
screen_element
security_screen_element
select_data(sim_option)[source]
select_outgoing_calls(sim_option)[source]
select_outgoing_messages(sim_option)[source]
sim_for_data
sim_for_outgoing_calls
sim_for_outgoing_messages
sim_pin_screen_element
tap_sim_security()[source]
class gaiatest.apps.settings.regions.wifi.Wifi(marionette)[source]

Bases: gaiatest.apps.base.Base

connect_to_network(network_info)[source]
disable_wifi()[source]
enable_wifi()[source]
is_wifi_enabled
join_hidden_network_screen_element
manage_certs_screen_element
manage_network_button
manage_network_screen_element
screen_element
select_certs_screen_element
tap_active_wifi()[source]
tap_connect_with_wps()[source]
tap_forget_wifi()[source]
tap_import_certs()[source]
tap_join_hidden_network()[source]
tap_manage_certs()[source]
tap_manage_networks()[source]
tap_security_ok()[source]
tap_security_selector()[source]
wps_screen_element

System

class gaiatest.apps.system.app.System(marionette)[source]

Bases: gaiatest.apps.base.Base

is_app_update_notification_displayed
open_utility_tray()[source]
screen_height_without_software_home_button
screen_width
software_buttons_height

Gets the height of the software buttons container on the screen. Always returns 0 if software buttons are not displayed.

status_bar
tap(x=None, y=None)[source]
wait_for_app_update_to_clear()[source]
wait_for_notification_toaster_displayed(timeout=30, message=None, for_app=None)[source]
wait_for_notification_toaster_not_displayed(timeout=10)[source]
wait_for_software_home_button_displayed(timeout=10, message=None)[source]
wait_for_software_home_button_not_displayed(timeout=10)[source]
wait_for_status_bar_displayed()[source]
wait_for_system_banner_displayed()[source]
wait_for_system_banner_not_displayed()[source]
wallpaper_properties

Regions

class gaiatest.apps.system.regions.activities.Activities(marionette)[source]

Bases: gaiatest.apps.base.Base

is_menu_visible
options_count
share_to_messages()[source]
share_to_ringtones()[source]
tap_camera()[source]
tap_cancel()[source]
tap_save_image()[source]
tap_wallpaper()[source]
class gaiatest.apps.system.regions.cards_view.Card(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

a11y_click_app_icon()[source]
a11y_click_close_button()[source]
a11y_click_screenshot_view()[source]
close()[source]
is_centered
is_displayed
manifest_url
subtitle
tap()[source]
title
wait_for_centered()[source]
class gaiatest.apps.system.regions.cards_view.CardsView(marionette)[source]

Bases: gaiatest.apps.base.PageRegion

a11y_wheel_cards_view(direction)[source]
cards
is_app_a11y_hidden(app)[source]
is_app_a11y_visible(app)[source]
is_cards_view_a11y_hidden
is_displayed
is_no_card_displayed
open_new_browser()[source]
open_new_private_window()[source]
swipe_to_previous_app()[source]
wait_for_cards_view()[source]
wait_for_cards_view_not_displayed()[source]
wait_for_no_card_displayed()[source]
class gaiatest.apps.system.regions.iac_publisher.IacPublisher(marionette)[source]

Bases: gaiatest.apps.base.Base

launch()[source]
manifest_url = 'app://test-iac-publisher.gaiamobile.org/manifest.webapp'
name = 'Test IAC Publisher'
number_of_connections
received_blob_message
received_str_message
tap_send_message()[source]
type_message(value)[source]
wait_for_message_received()[source]
class gaiatest.apps.system.regions.sleep_view.SleepScreen(marionette)[source]

Bases: gaiatest.apps.base.Base

class MenuItem(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

name
tap()[source]
SleepScreen.is_menu_visible
SleepScreen.menu_items
SleepScreen.tap_cancel_button()[source]
SleepScreen.wait_for_sleep_menu_visible()[source]
class gaiatest.apps.system.regions.status_bar.StatusBar(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

a11y_wheel_status_bar_time()[source]
height
is_airplane_mode_displayed
is_battery_displayed
is_data_connected
is_displayed
is_geolocation_displayed
is_mobile_connection_displayed
is_status_bar_maximized_wrapper_a11y_hidden
is_status_bar_minimized_wrapper_a11y_hidden
is_time_displayed
time
wait_for_airplane_mode_icon_displayed()[source]
wait_for_data_to_be_connected()[source]
wait_for_geolocation_icon_displayed()[source]
class gaiatest.apps.system.regions.utility_tray.CostControlWidget(marionette)[source]

Bases: gaiatest.apps.base.Base

tap()[source]
wait_for_limit_to_be_reached()[source]
class gaiatest.apps.system.regions.utility_tray.Notification(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

content
tap_notification()[source]
title
class gaiatest.apps.system.regions.utility_tray.UtilityTray(marionette)[source]

Bases: gaiatest.apps.base.Base

a11y_clear_all_notifications()[source]
a11y_click_quick_settings_full_app()[source]
a11y_wheel_utility_tray_grippy()[source]
clear_all_notifications()[source]
cost_control_widget
get_notifications(for_app=None)[source]
notifications
tap_settings_button()[source]
wait_for_dropped_down()[source]
class gaiatest.apps.system.regions.search_panel.SearchPanel(marionette)[source]

Bases: gaiatest.apps.base.Base

class Result(marionette, element)[source]

Bases: gaiatest.apps.base.PageRegion

name
tap()[source]
SearchPanel.app_results
SearchPanel.confirm_suggestion_notice()[source]
SearchPanel.go_to_url(url)[source]
SearchPanel.is_offline_message_visible
SearchPanel.offline_search_message
SearchPanel.tap_offline_settings_button()[source]
SearchPanel.wait_for_search_results_to_load(minimum_expected_results=1)[source]

Test

class gaiatest.apps.testapp.app.TestContainer(marionette)[source]

Bases: gaiatest.apps.base.Base

broadcast_dummy_system_message(msg)[source]
find_message_text(msg_placeholder_id)[source]
launch()[source]
manifest_url = 'app://test-container.gaiamobile.org/manifest.webapp'
name = 'Test Container'
set_dummy_system_message_handler(msg_placeholder_id)[source]
wait_until_launched()[source]

UI tests

class gaiatest.apps.ui_tests.app.UiTests(marionette)[source]

Bases: gaiatest.apps.base.Base

launch()[source]
manifest_url = 'app://uitest.gaiamobile.org/manifest.webapp'
tap_api_button()[source]
tap_back_button()[source]
tap_hw_button()[source]
tap_keyboard_option()[source]
tap_moz_id_button()[source]
tap_ui_button()[source]

Regions

class gaiatest.apps.ui_tests.regions.keyboard.KeyboardPage(marionette)[source]

Bases: gaiatest.apps.base.Base

email_input
number_input
switch_to_frame()[source]
tap_email_input()[source]
tap_number_input()[source]
tap_text_input()[source]
tap_url_input()[source]
text_input
url_input
class gaiatest.apps.ui_tests.regions.persona.Persona(marionette)[source]

Bases: gaiatest.apps.base.Base

get_assertion()[source]
switch_to_frame()[source]
tap_logout_button()[source]
tap_standard_button()[source]
tap_standard_sign_in()[source]
wait_for_login_event()[source]
wait_for_logout_event()[source]
wait_for_ready_event()[source]

UI tests (privileged)

class gaiatest.apps.ui_tests_privileged.app.UiTestsPivileged(marionette)[source]

Bases: gaiatest.apps.base.Base

launch()[source]
manifest_url = 'app://uitest-privileged.gaiamobile.org/manifest.webapp'
tap_contacts_option()[source]
tap_device_storage_option()[source]
tap_geolocation_option()[source]
tap_get_user_media_option()[source]

Regions

class gaiatest.apps.ui_tests_privileged.regions.contacts.ContactsPage(marionette)[source]

Bases: gaiatest.apps.base.Base

switch_to_frame()[source]
tap_insert_fake_contacts()[source]
class gaiatest.apps.ui_tests_privileged.regions.device_storage.DeviceStoragePage(marionette)[source]

Bases: gaiatest.apps.base.Base

switch_to_frame()[source]
tap_get_music_button_locator()[source]
tap_get_pictures_button_locator()[source]
tap_get_sdcard_button_locator()[source]
tap_get_videos_button_locator()[source]
class gaiatest.apps.ui_tests_privileged.regions.geolocation.GeolocationPage(marionette)[source]

Bases: gaiatest.apps.base.Base

switch_to_frame()[source]
tap_find_location_button()[source]
class gaiatest.apps.ui_tests_privileged.regions.user_media.UserMediaPage(marionette)[source]

Bases: gaiatest.apps.base.Base

switch_to_frame()[source]
tap_audio1_button()[source]
tap_video1_button()[source]

Video

class gaiatest.apps.videoplayer.app.VideoPlayer(marionette)[source]

Bases: gaiatest.apps.base.Base

empty_video_text
empty_video_title
first_video_name
launch()[source]
manifest_url = 'app://video.gaiamobile.org/manifest.webapp'
name = 'Video'
tap_first_video_item()[source]
total_video_count
wait_for_thumbnails_to_load(files_number, message=None)[source]

Regions

class gaiatest.apps.videoplayer.regions.fullscreen_video.FullscreenVideo(marionette)[source]

Bases: gaiatest.apps.base.Base

elapsed_time
is_video_playing
move_seek_slider(offset)[source]
name
show_controls()[source]
tap_forward()[source]
tap_play()[source]
tap_rewind()[source]
wait_for_player_frame_displayed()[source]

Wallpaper

class gaiatest.apps.wallpaper.app.Wallpaper(marionette)[source]

Bases: gaiatest.apps.base.Base

name = 'Wallpaper'
tap_wallpaper_by_index(index)[source]

Indices and tables