Skip to main content

Capture Mobile Element

Command description

Capture a screenshot of a specified mobile element and save it in a chosen folder.

Command Input Parameters

input parametersInput parameter typeDescription
Mobile Device ObjectPhoneConnected mobile object
Mobile ElementPhoneElement or str (captured element UID, not element name, not ms-rpa-id)Select a captured mobile element or an element returned by Get Mobile Element, Get Similar Mobile Elements, or Get Related Mobile Elements
Folder LocationstrThe absolute path of the destination folder to save the screenshot, such as C:\xx
File Name PatternenumRandom File Name, Custom File Name
Custom File NamestrScreenshot file name; required only when File Name Pattern is Custom File Name
Element Wait TimeoutnumberMaximum time to wait for the element to appear, in seconds; an error is reported when the timeout expires

Command Output Parameters

Output parametersOutput parameter typeDescription
Screenshot File PathstrAbsolute path of the saved screenshot file

Type definition reference

Example

tip

Enable Developer options on the mobile device, then connect it to the computer with a USB cable. See Connect Mobile Device

FAQ

See Mobile Automation FAQ