1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-04-13 14:20:50 +01:00

Add clickUiObject to BaseUiAutomation

Convenience method to click on o UiObject and throw an exception if the view does not change within a specified timeout.
This commit is contained in:
James Hartley 2016-05-03 18:13:03 +01:00
parent 73a54103e1
commit 8e66616159
2 changed files with 6 additions and 0 deletions

View File

@ -142,6 +142,12 @@ public class BaseUiAutomation extends UiAutomatorTestCase {
return object;
}
public void clickUiObject(UiObject uiobject, long timeout) throws Exception {
if (!uiobject.clickAndWaitForNewWindow(timeout)) {
throw new UiObjectNotFoundException(String.format("Timeout waiting for New Window"));
}
}
public int getDisplayHeight () {
return getUiDevice().getInstance().getDisplayHeight();
}