> For the complete documentation index, see [llms.txt](https://genfarmer-support.gitbook.io/genfarmer-eng/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://genfarmer-support.gitbook.io/genfarmer-eng/main-menu-bar/control-center/inspector.md).

# Inspector

Inspector là chức năng hỗ trợ anh em lấy thông tin package, element của ứng dụng để sử dụng trong việc viết Automation

<figure><img src="https://content.gitbook.com/content/7JJxETkZAGywbrUL9WJl/blobs/Lh7ZqZMIFPjZNnE1E69L/image.png" alt=""><figcaption><p>Inspector Interface</p></figcaption></figure>

The **Inspector** will be a separate popup from the GenFarmer app, allowing users to write automation scripts and retrieve application data most conveniently.

### Inspector Toolbar

<figure><img src="https://content.gitbook.com/content/7JJxETkZAGywbrUL9WJl/blobs/Am53iM8sh5iKOmwhT2xA/image.png" alt=""><figcaption><p><strong>The toolbar supports the main functions of the Inspector.</strong></p></figcaption></figure>

* **Select Devices:** The first box on the toolbar is a dropdown for selecting a device for the Inspector tool. This section includes all devices currently connected to GenFarmer.
* **Reload:** Allows you to reload the current interface of the device.
* **Enable Grid:** Turns on the element grid interface to identify elements more accurately.

<figure><img src="https://content.gitbook.com/content/7JJxETkZAGywbrUL9WJl/blobs/TL51rPBJD8IccSALMhVs/image.png" alt=""><figcaption><p><strong>Elements are displayed in blocks.</strong></p></figcaption></figure>

* **Enable Swipe:** Allows you to swipe the phone directly on the Inspector screen.
* **Enable Crop:** Allows you to capture images and convert them to Base64 format for use in the Image search node.

<figure><img src="https://content.gitbook.com/content/7JJxETkZAGywbrUL9WJl/blobs/OpU7yN3yn8YqXfzA6EB8/image.png" alt=""><figcaption><p><strong>Crop Image and Convert to Base64</strong></p></figcaption></figure>

### **Functions Displayed in the Inspector View**

First is the device interface, where you can hover the mouse over the interface to display the element blocks you need.<br>

<figure><img src="https://content.gitbook.com/content/7JJxETkZAGywbrUL9WJl/blobs/PK1EmckZFNksmt4MLzUf/image.png" alt=""><figcaption><p><strong>The "Forgot Password" element is selected.</strong></p></figcaption></figure>

Additionally, after clicking on an element in the interface, the middle column will update with information related to the selected element and application.

<figure><img src="https://content.gitbook.com/content/7JJxETkZAGywbrUL9WJl/blobs/nhdNhKiwIM075mDStKC9/image.png" alt=""><figcaption><p>Thông tin của element nút Quên mật khẩu</p></figcaption></figure>

**The information in the right column of the stream screen is as follows:**

* **Activity:** The action of the element
* **XPathLite:** The XPath of the element used for scripting
* **ClassName:** The class name of the element
* **Mouse Pos:** Coordinates of the selected position
* **Click:** Perform a click action on the element and automatically reload the device interface
* **Element Rect:** Coordinates of the element
* **Index:** The priority order of the element
* **Text:** The text contained in the element
* **Resourceid:** The ID of the element
* **Package:** The package ID of the application
* **Description:** The description of the element
* **Other items:** Check the states of the element

Additionally, you can select elements through the application's code interface.

<figure><img src="https://content.gitbook.com/content/7JJxETkZAGywbrUL9WJl/blobs/0PIHK5utTYbYL5LSb8Nq/image.png" alt=""><figcaption><p>The "Forgot Password" element turns yellow after being selected.</p></figcaption></figure>

The purpose of the Inspector is to help retrieve information to facilitate writing automation scripts more simply, quickly, and efficiently. This is a very special feature of GenFarmer.
