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
¶
-
installed_apps
¶
-
launch
(name, manifest_url=None, entry_point=None, switch_to_frame=True, launch_timeout=None)[source]¶
-
Data manager¶
-
class
gaiatest.gaia_test.
GaiaData
(marionette, testvars=None)[source]¶ -
active_telephony_state
¶
-
all_contacts
¶
-
all_settings
¶
-
bluetooth_is_discoverable
¶
-
bluetooth_is_enabled
¶
-
bluetooth_name
¶
-
current_audio_channel
¶
-
delete_all_call_log_entries
()[source]¶ The call log needs to be open and focused in order for this to work.
-
fm_radio_frequency
¶
-
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.
-
insert_call_entry
(call)[source]¶ The call log needs to be open and focused in order for this to work.
-
is_antenna_available
¶
-
is_cell_data_connected
¶
-
is_cell_data_enabled
¶
-
is_fm_radio_enabled
¶
-
is_wifi_enabled
¶
-
known_networks
¶
-
media_files
¶
-
music_files
¶
-
picture_files
¶
-
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.
-
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
¶
-
is_android_build
¶
-
is_b2g_running
¶
-
is_desktop_b2g
¶
-
is_emulator
¶
-
is_locked
¶
-
is_online
¶
-
is_screen_enabled
¶
-
screen_orientation
¶
-
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.
Test cases¶
-
class
gaiatest.gaia_test.
GaiaTestCase
(*args, **kwargs)[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'))
-
Apps¶
Base¶
Calendar¶
-
class
gaiatest.apps.calendar.app.
Calendar
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
Event
(marionette, element)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
location
¶
-
title
¶
-
-
Calendar.
accounts
¶
-
Calendar.
current_month_day
¶
-
Calendar.
current_month_year
¶
-
Calendar.
event_list_date
¶
-
Calendar.
events
¶
-
Calendar.
name
= 'Calendar'¶
-
Calendar.
settings
¶
-
class
Regions¶
-
class
gaiatest.apps.calendar.regions.event.
NewEvent
(marionette)[source]¶ Bases:
gaiatest.apps.calendar.app.Calendar
Clock¶
-
class
gaiatest.apps.clock.app.
Clock
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
name
= 'Clock'¶
-
Contacts¶
-
class
gaiatest.apps.contacts.app.
Contacts
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
Contact
(marionette, element)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
full_name
¶
-
image_data_group
¶
-
name
¶
-
-
Contacts.
contacts
¶
-
Contacts.
entry_point
= 'contacts'¶
-
Contacts.
is_favorites_list_displayed
¶
-
Contacts.
is_ice_list_icon_displayed
¶
-
Contacts.
is_no_contacts_message_displayed
¶
-
Contacts.
manifest_url
= 'app://communications.gaiamobile.org/manifest.webapp'¶
-
Contacts.
name
= 'Contacts'¶
-
Contacts.
status_message
¶
-
class
Regions¶
-
class
gaiatest.apps.contacts.regions.contact_details.
ContactDetails
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
add_remove_text
¶
-
comments
¶
-
full_name
¶
-
image_style
¶
-
phone_number
¶
-
phone_numbers
¶
-
-
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
¶
-
zip_code
¶
-
-
class
gaiatest.apps.contacts.regions.contact_form.
EditContact
(marionette)[source]¶ Bases:
gaiatest.apps.contacts.regions.contact_form.ContactForm
-
class
gaiatest.apps.contacts.regions.contact_form.
NewContact
(marionette)[source]¶ Bases:
gaiatest.apps.contacts.regions.contact_form.ContactForm
-
class
gaiatest.apps.contacts.regions.contact_import_picker.
ContactImportPicker
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.contacts.regions.gmail.
GmailLogin
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.contacts.regions.settings_form.
ConfirmationView
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
error_message
¶
-
Cost control¶
-
class
gaiatest.apps.cost_control.app.
CostControl
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
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.
-
wifi_data_usage_figure
¶
-
Regions¶
-
class
gaiatest.apps.cost_control.regions.ftu_step1.
FTUStep1
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.cost_control.regions.ftu_step3.
FTUStep3
(marionette)[source]¶ Bases:
gaiatest.apps.cost_control.app.CostControl
-
is_data_alert_switch_checked
¶
-
-
class
gaiatest.apps.cost_control.regions.settings.
Settings
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
is_data_alert_switch_checked
¶
-
Email¶
-
class
gaiatest.apps.email.app.
Email
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
Email.
emails_list_header_locator
= ('css selector', '.msg-list-header')¶
-
Email.
header
¶
-
Email.
mails
¶
-
Email.
name
= 'E-Mail'¶
-
Email.
toolbar
¶
-
-
class
gaiatest.apps.email.app.
Header
(marionette, element)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
is_compose_visible
¶
-
label
¶
-
-
class
gaiatest.apps.email.app.
Message
(marionette, element)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
senders_email
¶
-
subject
¶
-
-
class
gaiatest.apps.email.app.
ToolBar
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
is_a11y_visible
¶
-
is_edit_visible
¶
-
is_refresh_visible
¶
-
is_search_visible
¶
-
is_settings_visible
¶
-
is_visible
¶
-
Regions¶
-
class
gaiatest.apps.email.regions.new_email.
NewEmail
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.email.regions.read_email.
ReadEmail
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
body
¶
-
manifest_url
= 'app://email.gaiamobile.org/manifest.webapp'¶
-
senders_email
¶
-
subject
¶
-
-
class
gaiatest.apps.email.regions.settings.
DeleteConfirmation
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.email.regions.settings.
EmailAccountSettings
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.email.regions.settings.
Settings
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
Settings.
email_accounts
¶
-
-
class
gaiatest.apps.email.regions.setup.
ManualSetupEmail
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
name
= 'E-Mail'¶
-
Emergency call¶
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
-
text
¶
-
-
FmRadio.
airplane_warning_text
¶
-
FmRadio.
airplane_warning_title
¶
-
FmRadio.
favorite_channels
¶
-
FmRadio.
frequency
¶
-
FmRadio.
manifest_url
= 'app://fm.gaiamobile.org/manifest.webapp'¶
-
FmRadio.
name
= 'FM Radio'¶
-
class
First time use¶
-
class
gaiatest.apps.ftu.app.
Ftu
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
count_imported_contacts
¶
-
is_geolocation_enabled
¶
-
is_metrics_basic_enabled
¶
-
is_metrics_enhanced_enabled
¶
-
is_metrics_none_enabled
¶
-
languages_list
¶
-
name
= 'FTU'¶
-
selected_language
¶
-
step1_header_text
¶
-
step2_header_text
¶
-
step3_header_text
¶
-
step4_header_text
¶
-
step5_header_text
¶
-
step6_header_text
¶
-
timezone_title
¶
-
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
-
-
Gallery.
are_gallery_items_displayed
¶
-
Gallery.
empty_gallery_text
¶
-
Gallery.
empty_gallery_title
¶
-
Gallery.
gallery_items_number
¶
-
Gallery.
name
= 'Gallery'¶
-
Gallery.
thumbnails
¶
-
class
Regions¶
-
class
gaiatest.apps.gallery.regions.crop_view.
CropView
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.gallery.regions.edit_photo.
EditPhoto
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
EditPhoto.
effects
¶
-
-
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
¶
-
is_photo_toolbar_displayed
¶
-
photo_toolbar_options
¶
-
photo_toolbar_width
¶
-
Homescreen¶
-
class
gaiatest.apps.homescreen.app.
Homescreen
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
GaiaAppIcon
(marionette, element)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
is_app_installed
¶
-
is_displayed
¶
-
manifest_url
¶
-
-
Homescreen.
app_elements
¶
-
Homescreen.
is_at_topmost_position
¶
-
Homescreen.
name
= 'Default Home Screen'¶
-
Homescreen.
number_of_columns
¶
-
Homescreen.
visible_apps
¶
-
class
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_enter_key_name
¶
-
a11y_enter_key_role
¶
-
a11y_first_predictive_word_name
¶
-
a11y_first_predictive_word_role
¶
-
a11y_space_key_name
¶
-
a11y_space_key_role
¶
-
a11y_suggestions_container_role
¶
-
current_keyboard
¶
-
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'¶
Lockscreen¶
Messages¶
-
class
gaiatest.apps.messages.app.
Messages
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
Thread
(marionette, element)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
is_draft_icon_displayed
¶
-
-
Messages.
draft_threads
¶
-
Messages.
is_in_select_mode
¶
-
Messages.
manifest_url
= 'app://sms.gaiamobile.org/manifest.webapp'¶
-
Messages.
name
= 'Messages'¶
-
Messages.
threads
¶
-
class
Regions¶
-
class
gaiatest.apps.messages.regions.activities.
Activities
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.messages.regions.message_thread.
Message
(marionette, element)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
has_attachments
¶
-
id
¶
-
text
¶
-
-
class
gaiatest.apps.messages.regions.message_thread.
MessageThread
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
all_messages
¶
-
header_text
¶
-
received_messages
¶
-
sent_messages
¶
-
-
class
gaiatest.apps.messages.regions.messaging_settings.
MessagingSettings
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
Music¶
-
class
gaiatest.apps.music_oga.app.
Music
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
empty_music_text
¶
-
empty_music_title
¶
-
manifest_url
= 'app://music-oga.gaiamobile.org/manifest.webapp'¶
-
name
= 'Music OGA'¶
-
tabs
¶
-
views
¶
-
Regions¶
-
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]¶
-
class
gaiatest.apps.music.regions.player_view.
PlayerView
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
player_current_timestamp
¶
-
player_elapsed_time
¶
-
star_rating
¶
-
Persona¶
-
class
gaiatest.apps.persona.app.
Persona
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
Phone¶
-
class
gaiatest.apps.phone.app.
Phone
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
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
¶
-
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'¶
-
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
-
call_list
¶
-
groups_list
¶
-
header_text
¶
-
is_all_calls_tab_selected
¶
-
is_missed_calls_tab_selected
¶
-
no_logs_message
¶
-
-
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¶
-
calling_contact_information
¶
-
conference_label
¶
-
contact_background_style
¶
-
incoming_calling_contact
¶
-
incoming_calling_contact_while_on_call
¶
-
outgoing_calling_contact
¶
-
via_sim
¶
-
-
class
gaiatest.apps.phone.regions.keypad.
AddNewNumber
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.phone.regions.keypad.
BaseKeypad
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
phone_number
¶
-
-
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
¶
-
Settings¶
-
class
gaiatest.apps.settings.app.
Settings
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
current_view
¶
-
header_text
¶
-
is_airplane_mode_displayed
¶
-
name
= 'Settings'¶
-
screen_element
¶
-
title
¶
-
Regions¶
-
class
gaiatest.apps.settings.regions.accessibility.
Accessibility
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
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
-
grayscale_switch_visible
¶
-
invert_switch_visible
¶
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.accessibility.
AccessibilityInput
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.accessibility.
AccessibilityScreenreader
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.settings.regions.battery.
Battery
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.bluetooth.
Bluetooth
(marionette)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
device_name
¶
-
is_bluetooth_enabled
¶
-
is_visible_enabled
¶
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.cell_data.
CellData
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
carrier_name
¶
-
data_prompt
¶
-
is_data_toggle_checked
¶
-
is_roaming_toggle_checked
¶
-
screen_element
¶
-
-
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
¶
-
screen_element
¶
-
update_channel
¶
-
-
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
¶
-
class
-
class
gaiatest.apps.settings.regions.display.
Display
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.do_not_track.
DoNotTrack
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.keyboard.
BuiltInKeyBoard
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
manifest_url
= 'app://keyboard.gaiamobile.org/manifest.webapp'¶
-
-
class
gaiatest.apps.settings.regions.keyboard.
Keyboard
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.keyboard.
KeyboardAddMoreKeyboards
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.language.
Language
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
current_language
¶
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.media_storage.
MediaStorage
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
default_media_location
¶
-
external_storage0
¶
-
internal_storage
¶
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.screen_lock.
ScreenLock
(marionette)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
passcode_screen_element
¶
-
screen_element
¶
-
-
class
gaiatest.apps.settings.regions.sim_manager.
SimManager
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
screen_element
¶
-
security_screen_element
¶
-
sim_for_data
¶
-
sim_for_outgoing_calls
¶
-
sim_for_outgoing_messages
¶
-
sim_pin_screen_element
¶
-
System¶
-
class
gaiatest.apps.system.app.
System
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
is_app_update_notification_displayed
¶
-
screen_width
¶
Gets the height of the software buttons container on the screen. Always returns 0 if software buttons are not displayed.
-
status_bar
¶
-
wallpaper_properties
¶
-
Regions¶
-
class
gaiatest.apps.system.regions.activities.
Activities
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
options_count
¶
-
-
class
gaiatest.apps.system.regions.cards_view.
Card
(marionette, element)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
is_centered
¶
-
is_displayed
¶
-
manifest_url
¶
-
subtitle
¶
-
title
¶
-
-
class
gaiatest.apps.system.regions.cards_view.
CardsView
(marionette)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
cards
¶
-
is_displayed
¶
-
is_no_card_displayed
¶
-
-
class
gaiatest.apps.system.regions.iac_publisher.
IacPublisher
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
manifest_url
= 'app://test-iac-publisher.gaiamobile.org/manifest.webapp'¶
-
name
= 'Test IAC Publisher'¶
-
number_of_connections
¶
-
received_blob_message
¶
-
received_str_message
¶
-
-
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
¶
-
-
class
-
class
gaiatest.apps.system.regions.status_bar.
StatusBar
(marionette, element)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
height
¶
-
is_airplane_mode_displayed
¶
-
is_battery_displayed
¶
-
is_data_connected
¶
-
is_displayed
¶
-
is_geolocation_displayed
¶
-
is_mobile_connection_displayed
¶
-
is_time_displayed
¶
-
time
¶
-
-
class
gaiatest.apps.system.regions.utility_tray.
CostControlWidget
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.system.regions.utility_tray.
Notification
(marionette, element)[source]¶ Bases:
gaiatest.apps.base.PageRegion
-
content
¶
-
title
¶
-
-
class
gaiatest.apps.system.regions.utility_tray.
UtilityTray
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
cost_control_widget
¶
-
notifications
¶
-
-
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
¶
-
-
SearchPanel.
app_results
¶
-
SearchPanel.
is_offline_message_visible
¶
-
SearchPanel.
link_results
¶
-
SearchPanel.
offline_search_message
¶
-
class
Test¶
-
class
gaiatest.apps.testapp.app.
TestContainer
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
manifest_url
= 'app://test-container.gaiamobile.org/manifest.webapp'¶
-
name
= 'Test Container'¶
-
UI tests¶
-
class
gaiatest.apps.ui_tests.app.
UiTests
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
manifest_url
= 'app://uitest.gaiamobile.org/manifest.webapp'¶
-
UI tests (privileged)¶
-
class
gaiatest.apps.ui_tests_privileged.app.
UiTestsPivileged
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
manifest_url
= 'app://uitest-privileged.gaiamobile.org/manifest.webapp'¶
-
Regions¶
-
class
gaiatest.apps.ui_tests_privileged.regions.contacts.
ContactsPage
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.ui_tests_privileged.regions.device_storage.
DeviceStoragePage
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.ui_tests_privileged.regions.geolocation.
GeolocationPage
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base
-
class
gaiatest.apps.ui_tests_privileged.regions.user_media.
UserMediaPage
(marionette)[source]¶ Bases:
gaiatest.apps.base.Base