You can also access screenshots of UI elements with code modules. This is useful for image-based automation, where UI items are identified by image comparison.
The following screenshot shows the necessary code to address a screenshot of a repository item:
-
Calls the repository according to the repository’s hierarchy, beginning with DemoApplication in this case.
-
Calls the Info object of the repository item (this is necessary because only this class works with the following method).
-
Calls the Get method to retrieve the screenshot.