Package tlib :: Package base :: Module AndroidHelper |
[hide private]
[frames] | no frames]

# Module AndroidHelper

source code

Functions | [hide private]
is_webdriver_running(tlib_logger, adb_logger, log=True) Function to validate if webdriver is running and a connection can be established | source code
get_device_status(tlib_logger, adb_logger, serial_id) Get status of a device using it's serial id | source code
setup_ip_connection(tlib_logger, adb_logger, serial_id) Connects to an android device via IP and waits for the connection to be established. | source code
terminate_ip_connection(tlib_logger, adb_logger, serial_id) Disconnects from device | source code
close_webdriver(tlib_logger, adb_logger, serial_id) Stops Webdriver app o the device | source code
setup_port_forwarding(tlib_logger, adb_logger, serial_id) Setup port forwarding between computer and device. | source code
teardown_port_forwarding(tlib_logger, adb_logger) Terminates all port forwarding connections | source code
stop_adb_server(tlib_logger, adb_logger) Stops adb on the machine | source code
start_webdriver(tlib_logger, adb_logger, serial_id) Starts Webdriver app on the device | source code
wait_for_connection_to_webdriver(tlib_logger, adb_logger) Waits up to 3 seconds for a connection to Webdriver | source code
setup_webdriver(tlib_logger, adb_logger, serial_id) Connects to a device and starts webdriver | source code
teardown_webdriver(tlib_logger, adb_logger, serial_id) Closes webdriver and disconnects from device | source code
log_adb_output(logger, out) Logs ADB output | source code

Variables | [hide private]
| DEVICE_UNPLUGGED = ``'``disconnected``'``
| DEVICE_OFFLINE = ``'``offline``'``
| DEVICE_UNAUTHORIZED = ``'``unauthorized``'``
| DEVICE_ONLINE = ``'``online``'``
| __package__ = ``'``tlib.base``'``

Function Details | [hide private]

### is_webdriver_running(tlib_logger, adb_logger, log=True) | source code
Function to validate if webdriver is running and a connection can be established Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger `log` (bool) - When true, log debugging information

### get_device_status(tlib_logger, adb_logger, serial_id) | source code
Get status of a device using it's serial id Serial id can be either a ID (for devices connected to USB) or an IP and port (For devices connected via IP) Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger `serial_id` (str) - Device's serial number

### setup_ip_connection(tlib_logger, adb_logger, serial_id) | source code
Connects to an android device via IP and waits for the connection to be established. Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger `serial_id` (str) - Device's serial number

### terminate_ip_connection(tlib_logger, adb_logger, serial_id) | source code
Disconnects from device Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger `serial_id` (str) - Device's serial number

### close_webdriver(tlib_logger, adb_logger, serial_id) | source code
Stops Webdriver app o the device Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger `serial_id` (str) - Device's serial number

### setup_port_forwarding(tlib_logger, adb_logger, serial_id) | source code
Setup port forwarding between computer and device. Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger `serial_id` (str) - Device's serial number

### teardown_port_forwarding(tlib_logger, adb_logger) | source code
Terminates all port forwarding connections Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger

### stop_adb_server(tlib_logger, adb_logger) | source code
Stops adb on the machine This can be required by TeamCity so some folders are not locked Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger

### start_webdriver(tlib_logger, adb_logger, serial_id) | source code
Starts Webdriver app on the device Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger `serial_id` (str) - Device's serial number

### wait_for_connection_to_webdriver(tlib_logger, adb_logger) | source code
Waits up to 3 seconds for a connection to Webdriver Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger

### setup_webdriver(tlib_logger, adb_logger, serial_id) | source code
Connects to a device and starts webdriver Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger `serial_id` (str) - Device's serial number

### teardown_webdriver(tlib_logger, adb_logger, serial_id) | source code
Closes webdriver and disconnects from device Parameters: `tlib_logger` (logging.logger) - TLib logger `adb_logger` (logging.logger) - ADB logger `serial_id` (str) - Device's serial number

### log_adb_output(logger, out) | source code
Logs ADB output Parameters: `logger` (logging.logger) - ADB logger