1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 10:51:13 +01:00

SkypeWorkload: Workload Fixes

Fixed contact not being found when mistakenly selecting search for
bots instead of contact.

Changed element used to determine when contact has been
selected from status indicator to search icon as with other other
contacts in view the element is never removed.

Now throws error if end call button is not found otherwise workload
could fail to start the call and incorrectly report overall success.
This commit is contained in:
Marc Bonnici 2016-12-14 18:04:08 +00:00
parent d493b1e790
commit 1102ba1679
2 changed files with 9 additions and 5 deletions

View File

@ -126,16 +126,18 @@ public class UiAutomation extends UxPerfUiAutomation {
waitObject(search, 10);
search.setText(name);
UiObject peopleItem = clickUiObject(BY_TEXT, name, "android.widget.TextView");
UiObject peopleItem = new UiObject(new UiSelector().textContains(name)
.resourceId(packageID + "people_item_full_name"));
peopleItem.click();
UiObject avatarPresence =
new UiObject(new UiSelector().resourceId(packageID + "skype_avatar_presence"));
UiObject search_item_icon =
new UiObject(new UiSelector().resourceId(packageID + "search_item_icon"));
UiObject confirm =
new UiObject(new UiSelector().resourceId(packageID + "fab"));
// On some devices two clicks are needed to select a contact.
if (!avatarPresence.waitUntilGone(uiAutoTimeout)) {
if (!search_item_icon.waitUntilGone(uiAutoTimeout)) {
if (!sharingResource || !confirm.exists()) {
peopleItem.click();
}
@ -205,7 +207,9 @@ public class UiAutomation extends UxPerfUiAutomation {
// Hang up the call and log how long that takes
logger = new ActionLogger(testTag + "_stop", parameters);
logger.start();
tryButton(endButton, 500);
if (!(tryButton(endButton, 500))){
throw new UiObjectNotFoundException("Could not find end call button on screen.");
}
logger.stop();
}