Dump window hierarchy view from uiautomator to a file when WA fails
during execution. Note: the xml file are pre-formatted after dump.
Implementation specific to android.device.
Minor code maintenance for base classes BaseUiAutomation and
UxPerfUiAutomation. Changes include:
- Prefer static calls for UiDevice methods where possible
- Rename inconsistently named variables
- Avoid long wrapped lines where possible
- Remove unused imports
- Fix whitespace around operators
Add a more general check that pings a network host rather than checking
the status of dumpsys wifi. This is because not all devices are
connected via wifi.
Remove the clickUiObject method from the base class and refactor the
gmail workload to use clickAndWaitForWindow methods instead. For quick
popup menus prefer simple click events.
Add intelligence to helper method in UxPerfUiAutomation class to query
the present view during the method call rather than passing this in
explicitly as a parameter.
Fix confirmAccess method to first test for the existence of a
confirmation object before waiting on timeout.
A new workload for testing context switching between applications.
Uses googlephotos as the producer workload and gmail and skype as
the consumer workloads.
This allows workloads to be launched in a pre-determined orientation not the orientation of the physical device itself.
Updated the productivity workloads to take advantage of this new facility.
Move confirmAccess method out of reader and skype workloads into
UxPerfUiAutomation base class for code reuse.
Amend project properties for reader workload to use SDK version 18.
Update jar files appropriately.
Check in missing UiAutomation .class files
Fix generation and deletion of dump sys logs including renaming to a standard [test tag]_[test number].log format
Improved Reader to run across a range of devices with subtlety different layouts and views
This extends on BaseUiAutomation to include Ux performance instrumentation and UiAutomation convenience classes.
Todo - extend the create workload infrastructure to allow you to create a new UxPerfUiAutomation workload.
The change will allow us to use UiAutomator methods introduced in API 18, such as resourceId.
As a consequence of the change all dependent uiauto workloads have been incremented also.
Tested by rebuilding all uiautomator workloads. They were not run on devices.
If uninstall fails, "pm clear" should be called to make sure that the
next time the app is launched it starts from a known state (which would
normally be ensured by the uninstall).
It's possible that there is already a version of an app on target that
differs form the version of the apk on the host. In such cases, WA will
usually try to uninstall the target version and install the host
version.
It's possible that the uninstall may fail. If that happens, it will be
reported as a warning but workload exectuion will proceed with the
target version. In this case, apk_version would have already been set to
that of the host apk. This change ensures that the APK version is
correctly set to the target version (the one that actually ran).
- android/workload: emoved an extra bank line between methods
- trace_cmd: define member attribute inside __init__
- adb_shell: ignore pylint warning about too many branches in this case
- Deal with the dropped connection on issuing "reboot"
- Introduced a fixed initial delay before polling for connection to
avoid re-connecting to adevice that is still in the process of
shutting down.
Added two commands to WA to record and replay input events using revent.
As part of this also added the ability to get a device model from
android and linux device. This may need to be improved in the future.
Added:
get_binary_path: Checks binary_directory for the wanted binary, if
if its not there, it will use which to find a
system one. returns the full path
install_if_needed: will install a binary only if it is not present.
Changes:
- Busybox is now deployed to non-rooted devices
- is_installed has now been removed as the new functions supersede it
- binaries will now always be installed to `binaries_directory` and
not system folders.
- updated workloads to use these new functions
- rt-app and sysbench might still need work
As of Android 6.0, apps can request permissions at runtime. If the
target device is running Android 6.0+ these permissions are now automatically
granted.
Previously swipe_to_unlock was not used and conflicted with a method
of the same name.
- swipe_to_unlock() renamed perform_unlock_swipe()
- swipe_to_unlock parameter now takes a direction, this allows swipe unlocking on Android M devices
- ensure_screen_is_on() will now also unlock the screen if swipe_to_unlock is set