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:
parent
73a54103e1
commit
8e66616159
Binary file not shown.
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user