Package com.axway.ats.uiengine.utilities
Class UiEngineUtilities
- java.lang.Object
-
- com.axway.ats.uiengine.utilities.UiEngineUtilities
-
public class UiEngineUtilities extends Object
Generic utility class
-
-
Constructor Summary
Constructors Constructor Description UiEngineUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcreateScreenshot(String filePath, UiDriver uiDriver)Create a screenshot image (supported image format/type is PNG).
If the screenshot image file already exists it will be automatically replaced by the new one.
Currently the supported UI drivers areAbstractRealBrowserDriverandMobileDriver:AbstractRealBrowserDriver- the method makes a best effort to create a screenshot, depending on the browser to return the following in order of preference: Entire page Current window Visible portion of the current frame The screenshot of the entire display containing the browserMobileDriver- creates a screenshot of the mobile device screen.
NOTE: There is a known issue on Android Virtual Device with "Use Host GPU" enabled option.static voidsleep()Sleep for period equal to the UI commands delay as defined in the UI Engine configurationstatic voidsleep(int millis)Sleep for the specified number of milliseconds
-
-
-
Method Detail
-
sleep
public static void sleep()
Sleep for period equal to the UI commands delay as defined in the UI Engine configuration
-
sleep
public static void sleep(int millis)
Sleep for the specified number of milliseconds- Parameters:
millis-
-
createScreenshot
public static void createScreenshot(String filePath, UiDriver uiDriver)
Create a screenshot image (supported image format/type is PNG).
If the screenshot image file already exists it will be automatically replaced by the new one.
Currently the supported UI drivers areAbstractRealBrowserDriverandMobileDriver:AbstractRealBrowserDriver- the method makes a best effort to create a screenshot, depending on the browser to return the following in order of preference:- Entire page
- Current window
- Visible portion of the current frame
- The screenshot of the entire display containing the browser
MobileDriver- creates a screenshot of the mobile device screen.
NOTE: There is a known issue on Android Virtual Device with "Use Host GPU" enabled option. So in order to get a screenshot it should be disabled. Keep in mind that it will affect the performance, because it is a performance acceleration option.
- Parameters:
filePath- the screenshot image file pathuiDriver-UiDriverinstance
-
-