1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

Skype: Added check for update popup.

Since there has been an update to the skype app, there was now a
update prompt preventing test from running. Now checks for the
prompt on older versions of skype and dismisses it if present.
This commit is contained in:
Marc Bonnici 2016-09-23 10:51:07 +01:00
parent 2b6f036d9a
commit e69aea4e69
2 changed files with 17 additions and 0 deletions

View File

@ -58,6 +58,7 @@ public class UiAutomation extends UxPerfUiAutomation {
// Run tests
handleLoginScreen(loginName, loginPass);
dismissUpdatePopupIfPresent();
searchForContact(contactName);
if (ACTION_VOICE.equalsIgnoreCase(callType)) {
@ -86,6 +87,22 @@ public class UiAutomation extends UxPerfUiAutomation {
signinButton.clickAndWaitForNewWindow();
}
public void dismissUpdatePopupIfPresent() throws Exception {
UiObject updateNotice =
new UiObject(new UiSelector().resourceId(packageID + "update_notice_dont_show_again"));
//Detect if the update notice popup is present
if (updateNotice.waitForExists(uiAutoTimeout)) {
//Stop the notice from reappearing
updateNotice.click();
UiObject contiuneButton = getUiObjectByText("Continue", "android.widget.Button");
if (contiuneButton.exists()) {
contiuneButton.click();
}
}
}
public void searchForContact(String name) throws Exception {
UiObject menuSearch = new UiObject(new UiSelector().resourceId(packageID + "menu_search"));
boolean sharingResource = false;