# Table of Contents - [Một số biến mặc định | GPM Automate VI](#m-t-s-bi-n-m-c-nh-gpm-automate-vi) - [Variables | GPM Automate VI](#variables-gpm-automate-vi) - [Các block | GPM Automate VI](#c-c-block-gpm-automate-vi) - [Text & number | GPM Automate VI](#text-number-gpm-automate-vi) - [HTTP | GPM Automate VI](#http-gpm-automate-vi) - [Workflow | GPM Automate VI](#workflow-gpm-automate-vi) - [AI | GPM Automate VI](#ai-gpm-automate-vi) - [Clipboard | GPM Automate VI](#clipboard-gpm-automate-vi) - [Mail | GPM Automate VI](#mail-gpm-automate-vi) - [Image Search | GPM Automate VI](#image-search-gpm-automate-vi) - [File & Folder | GPM Automate VI](#file-folder-gpm-automate-vi) - [Navigation | GPM Automate VI](#navigation-gpm-automate-vi) - [Javascript | GPM Automate VI](#javascript-gpm-automate-vi) - [Switch | GPM Automate VI](#switch-gpm-automate-vi) - [Google service | GPM Automate VI](#google-service-gpm-automate-vi) - [Cookie | GPM Automate VI](#cookie-gpm-automate-vi) - [Alert | GPM Automate VI](#alert-gpm-automate-vi) - [References | GPM Automate VI](#references-gpm-automate-vi) - [Normal block | GPM Automate VI](#normal-block-gpm-automate-vi) - [While | GPM Automate VI](#while-gpm-automate-vi) - [For | GPM Automate VI](#for-gpm-automate-vi) - [Else | GPM Automate VI](#else-gpm-automate-vi) - [Increase variable | GPM Automate VI](#increase-variable-gpm-automate-vi) - [Else if | GPM Automate VI](#else-if-gpm-automate-vi) - [If | GPM Automate VI](#if-gpm-automate-vi) - [Decrease variable | GPM Automate VI](#decrease-variable-gpm-automate-vi) - [Set variable | GPM Automate VI](#set-variable-gpm-automate-vi) - [Count | GPM Automate VI](#count-gpm-automate-vi) - [Delay | GPM Automate VI](#delay-gpm-automate-vi) - [Element | GPM Automate VI](#element-gpm-automate-vi) - [Next loop | GPM Automate VI](#next-loop-gpm-automate-vi) - [Mouse | GPM Automate VI](#mouse-gpm-automate-vi) - [Keyboard | GPM Automate VI](#keyboard-gpm-automate-vi) - [Scroll | GPM Automate VI](#scroll-gpm-automate-vi) - [Exit loop | GPM Automate VI](#exit-loop-gpm-automate-vi) - [Random text | GPM Automate VI](#random-text-gpm-automate-vi) - [Split text | GPM Automate VI](#split-text-gpm-automate-vi) - [Read json | GPM Automate VI](#read-json-gpm-automate-vi) - [Random number | GPM Automate VI](#random-number-gpm-automate-vi) - [Math execute | GPM Automate VI](#math-execute-gpm-automate-vi) - [Regex | GPM Automate VI](#regex-gpm-automate-vi) - [2FA code | GPM Automate VI](#2fa-code-gpm-automate-vi) - [Copy file | GPM Automate VI](#copy-file-gpm-automate-vi) - [File exists | GPM Automate VI](#file-exists-gpm-automate-vi) - [Set clipboard text | GPM Automate VI](#set-clipboard-text-gpm-automate-vi) - [Get clipboard text | GPM Automate VI](#get-clipboard-text-gpm-automate-vi) - [HTTP Download | GPM Automate VI](#http-download-gpm-automate-vi) - [ChatGPT | GPM Automate VI](#chatgpt-gpm-automate-vi) - [File read all text | GPM Automate VI](#file-read-all-text-gpm-automate-vi) - [Delete file | GPM Automate VI](#delete-file-gpm-automate-vi) - [Move/rename file | GPM Automate VI](#move-rename-file-gpm-automate-vi) - [File write all text | GPM Automate VI](#file-write-all-text-gpm-automate-vi) - [Image exists | GPM Automate VI](#image-exists-gpm-automate-vi) - [Wait to image | GPM Automate VI](#wait-to-image-gpm-automate-vi) - [HTTP Request | GPM Automate VI](#http-request-gpm-automate-vi) - [File append line | GPM Automate VI](#file-append-line-gpm-automate-vi) - [Image search | GPM Automate VI](#image-search-gpm-automate-vi) - [Image to Base64 | GPM Automate VI](#image-to-base64-gpm-automate-vi) - [Read mail code | GPM Automate VI](#read-mail-code-gpm-automate-vi) - [File read all lines | GPM Automate VI](#file-read-all-lines-gpm-automate-vi) - [Move / rename folder | GPM Automate VI](#move-rename-folder-gpm-automate-vi) - [Read excel file | GPM Automate VI](#read-excel-file-gpm-automate-vi) - [Ví dụ kết hợp | GPM Automate VI](#v-d-k-t-h-p-gpm-automate-vi) - [Wait element | GPM Automate VI](#wait-element-gpm-automate-vi) - [Read outlook (Oauth2) | GPM Automate VI](#read-outlook-oauth2-gpm-automate-vi) - [Get element text | GPM Automate VI](#get-element-text-gpm-automate-vi) - [Append excel file | GPM Automate VI](#append-excel-file-gpm-automate-vi) - [Get element attribute | GPM Automate VI](#get-element-attribute-gpm-automate-vi) - [Write excel file | GPM Automate VI](#write-excel-file-gpm-automate-vi) - [Delete folder | GPM Automate VI](#delete-folder-gpm-automate-vi) - [Folder get file list | GPM Automate VI](#folder-get-file-list-gpm-automate-vi) - [Count element | GPM Automate VI](#count-element-gpm-automate-vi) - [Go to URL | GPM Automate VI](#go-to-url-gpm-automate-vi) - [New tab | GPM Automate VI](#new-tab-gpm-automate-vi) - [Close tab | GPM Automate VI](#close-tab-gpm-automate-vi) - [Active tab | GPM Automate VI](#active-tab-gpm-automate-vi) - [Wait URL Changed | GPM Automate VI](#wait-url-changed-gpm-automate-vi) - [Back URL | GPM Automate VI](#back-url-gpm-automate-vi) - [Reload | GPM Automate VI](#reload-gpm-automate-vi) - [Mouse click | GPM Automate VI](#mouse-click-gpm-automate-vi) - [Get URL | GPM Automate VI](#get-url-gpm-automate-vi) - [Select dropdown | GPM Automate VI](#select-dropdown-gpm-automate-vi) - [Scroll to top | GPM Automate VI](#scroll-to-top-gpm-automate-vi) - [File upload | GPM Automate VI](#file-upload-gpm-automate-vi) - [Key press | GPM Automate VI](#key-press-gpm-automate-vi) - [Scroll to bottom | GPM Automate VI](#scroll-to-bottom-gpm-automate-vi) - [Random scroll | GPM Automate VI](#random-scroll-gpm-automate-vi) - [Switch to default | GPM Automate VI](#switch-to-default-gpm-automate-vi) - [Import cookie | GPM Automate VI](#import-cookie-gpm-automate-vi) - [Scroll to element | GPM Automate VI](#scroll-to-element-gpm-automate-vi) - [Switch to frame | GPM Automate VI](#switch-to-frame-gpm-automate-vi) - [Folder exists | GPM Automate VI](#folder-exists-gpm-automate-vi) - [Create folder | GPM Automate VI](#create-folder-gpm-automate-vi) - [Export cookie | GPM Automate VI](#export-cookie-gpm-automate-vi) - [Accept alert | GPM Automate VI](#accept-alert-gpm-automate-vi) - [Call function | GPM Automate VI](#call-function-gpm-automate-vi) - [Mouse press and hold | GPM Automate VI](#mouse-press-and-hold-gpm-automate-vi) - [Mouse move | GPM Automate VI](#mouse-move-gpm-automate-vi) - [Mouse scroll | GPM Automate VI](#mouse-scroll-gpm-automate-vi) - [Mouse try to click | GPM Automate VI](#mouse-try-to-click-gpm-automate-vi) - [Mouse release | GPM Automate VI](#mouse-release-gpm-automate-vi) - [Switch to popup | GPM Automate VI](#switch-to-popup-gpm-automate-vi) - [Execute JS code | GPM Automate VI](#execute-js-code-gpm-automate-vi) - [Cancel alert | GPM Automate VI](#cancel-alert-gpm-automate-vi) - [Get extension id | GPM Automate VI](#get-extension-id-gpm-automate-vi) - [Read google sheet | GPM Automate VI](#read-google-sheet-gpm-automate-vi) - [Write google sheet | GPM Automate VI](#write-google-sheet-gpm-automate-vi) --- # Một số biến mặc định | GPM Automate VI 1. **$profileName:** giá trị của biến này là tên của profile đang mở. 2. **$profileId:** giá trị của biến này là ID của profile đang mở. 3. **$profileProxy:** giá trị của biến này là proxy mà profile đang mở sử dụng. 4. **$loopIndex:** chỉ số của vòng lặp For. 5. **$inputExcel:** file excel đầu vào, khi tool của bạn viết có nội dung cần đọc ghi dữ liệu từ 1 file excel. 6. **$inputExcelTotalRows:** trả về tổng số dòng của 1 file input excel (ở mục số 5). 7. **$inputExcelFileLocation:** trả về đường dẫn (file path) của file input excel (ở mục số 5). 8. **$inputExcelCurrentRow:** trả về số thứ tự dòng hiện tại đang được truy xuất của file input excel khi thực hiện việc đọc excel. [NextCác blockchevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block) Last updated 9 months ago --- # Variables | GPM Automate VI [Set variablechevron-right](https://docs.gpmautomate.com/no-code-automation/variables/set-variable) [Increase variablechevron-right](https://docs.gpmautomate.com/no-code-automation/variables/increase-variable) [Decrease variablechevron-right](https://docs.gpmautomate.com/no-code-automation/variables/decrease-variable) [Countchevron-right](https://docs.gpmautomate.com/no-code-automation/variables/count) [PreviousElsechevron-left](https://docs.gpmautomate.com/no-code-automation/cac-block/else) [NextSet variablechevron-right](https://docs.gpmautomate.com/no-code-automation/variables/set-variable) --- # Các block | GPM Automate VI [Normal blockchevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/normal-block) [Forchevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/for) [Whilechevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/while) [Ifchevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/if) [Else ifchevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/else-if) [Elsechevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/else) [PreviousMột số biến mặc địnhchevron-left](https://docs.gpmautomate.com/) [NextNormal blockchevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/normal-block) --- # Text & number | GPM Automate VI [Random textchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/random-text) [Split textchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/split-text) [Read jsonchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/read-json) [Regexchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/regex) [Random numberchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/random-number) [Math executechevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/math-execute) [2FA codechevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/2fa-code) [PreviousDelaychevron-left](https://docs.gpmautomate.com/no-code-automation/workflow/delay) [NextRandom textchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/random-text) --- # HTTP | GPM Automate VI [HTTP Requestchevron-right](https://docs.gpmautomate.com/http/http-request) [HTTP Downloadchevron-right](https://docs.gpmautomate.com/http/http-download) [PreviousSet clipboard textchevron-left](https://docs.gpmautomate.com/clipboard/set-clipboard-text) [NextHTTP Requestchevron-right](https://docs.gpmautomate.com/http/http-request) --- # Workflow | GPM Automate VI [Exit loopchevron-right](https://docs.gpmautomate.com/no-code-automation/workflow/exit-loop) [Next loopchevron-right](https://docs.gpmautomate.com/no-code-automation/workflow/next-loop) [Delaychevron-right](https://docs.gpmautomate.com/no-code-automation/workflow/delay) [PreviousCountchevron-left](https://docs.gpmautomate.com/no-code-automation/variables/count) [NextExit loopchevron-right](https://docs.gpmautomate.com/no-code-automation/workflow/exit-loop) --- # AI | GPM Automate VI [ChatGPTchevron-right](https://docs.gpmautomate.com/ai/chatgpt) [PreviousVí dụ kết hợpchevron-left](https://docs.gpmautomate.com/image-search/vi-du-ket-hop) [NextChatGPTchevron-right](https://docs.gpmautomate.com/ai/chatgpt) --- # Clipboard | GPM Automate VI Dữ liệu trong clipboard thường chỉ tồn tại cho đến khi bạn sao chép hoặc cắt một mục khác hoặc khi bạn shutdown máy tính. Có thể áp dụng 2 action này để copy, paste dữ liệu. Tuy nhiên, nó chỉ có tác dụng tốt nhất khi xử lý đơn luồng. Đa luồng sẽ không phù hợp. [PreviousFolder get file listchevron-left](https://docs.gpmautomate.com/file-and-folder/folder-get-file-list) [NextGet clipboard textchevron-right](https://docs.gpmautomate.com/clipboard/get-clipboard-text) Last updated 1 year ago --- # Mail | GPM Automate VI [Read mail codechevron-right](https://docs.gpmautomate.com/mail/read-mail-code) [Read outlook (Oauth2)chevron-right](https://docs.gpmautomate.com/mail/read-outlook-oauth2) [PreviousChatGPTchevron-left](https://docs.gpmautomate.com/ai/chatgpt) [NextRead mail codechevron-right](https://docs.gpmautomate.com/mail/read-mail-code) --- # Image Search | GPM Automate VI **Chú ý:** Hãy đảm bảo tỉ lệ scale của trang web lúc bạn screenshot ảnh phải giống với tỉ lệ scale lúc bạn chạy thực tế. Nếu không tính năng này sẽ không hoạt động. [PreviousHTTP Downloadchevron-left](https://docs.gpmautomate.com/http/http-download) [NextWait to imagechevron-right](https://docs.gpmautomate.com/image-search/wait-to-image) Last updated 1 year ago --- # File & Folder | GPM Automate VI [File existschevron-right](https://docs.gpmautomate.com/file-and-folder/file-exists) [Copy filechevron-right](https://docs.gpmautomate.com/file-and-folder/copy-file) [Move/rename filechevron-right](https://docs.gpmautomate.com/file-and-folder/move-rename-file) [Delete filechevron-right](https://docs.gpmautomate.com/file-and-folder/delete-file) [File read all textchevron-right](https://docs.gpmautomate.com/file-and-folder/file-read-all-text) [File read all lineschevron-right](https://docs.gpmautomate.com/file-and-folder/file-read-all-lines) [File write all textchevron-right](https://docs.gpmautomate.com/file-and-folder/file-write-all-text) [File append linechevron-right](https://docs.gpmautomate.com/file-and-folder/file-append-line) [Read excel filechevron-right](https://docs.gpmautomate.com/file-and-folder/read-excel-file) [Write excel filechevron-right](https://docs.gpmautomate.com/file-and-folder/write-excel-file) [Append excel filechevron-right](https://docs.gpmautomate.com/file-and-folder/append-excel-file) [Folder existschevron-right](https://docs.gpmautomate.com/file-and-folder/folder-exists) [Create folderchevron-right](https://docs.gpmautomate.com/file-and-folder/create-folder) [Move / rename folderchevron-right](https://docs.gpmautomate.com/file-and-folder/move-rename-folder) [Delete folderchevron-right](https://docs.gpmautomate.com/file-and-folder/delete-folder) [Folder get file listchevron-right](https://docs.gpmautomate.com/file-and-folder/folder-get-file-list) [Previous2FA codechevron-left](https://docs.gpmautomate.com/no-code-automation/text-and-number/2fa-code) [NextFile existschevron-right](https://docs.gpmautomate.com/file-and-folder/file-exists) --- # Navigation | GPM Automate VI [New tabchevron-right](https://docs.gpmautomate.com/navigation/new-tab) [Active tabchevron-right](https://docs.gpmautomate.com/navigation/active-tab) [Close tabchevron-right](https://docs.gpmautomate.com/navigation/close-tab) [Go to URLchevron-right](https://docs.gpmautomate.com/navigation/go-to-url) [Back URLchevron-right](https://docs.gpmautomate.com/navigation/back-url) [Reloadchevron-right](https://docs.gpmautomate.com/navigation/reload) [Get URLchevron-right](https://docs.gpmautomate.com/navigation/get-url) [Wait URL Changedchevron-right](https://docs.gpmautomate.com/navigation/wait-url-changed) [PreviousRead outlook (Oauth2)chevron-left](https://docs.gpmautomate.com/mail/read-outlook-oauth2) [NextNew tabchevron-right](https://docs.gpmautomate.com/navigation/new-tab) --- # Javascript | GPM Automate VI [Execute JS codechevron-right](https://docs.gpmautomate.com/javascript/execute-js-code) [Get extension idchevron-right](https://docs.gpmautomate.com/javascript/get-extension-id) [PreviousCancel alertchevron-left](https://docs.gpmautomate.com/alert/cancel-alert) [NextExecute JS codechevron-right](https://docs.gpmautomate.com/javascript/execute-js-code) --- # Switch | GPM Automate VI [Switch to defaultchevron-right](https://docs.gpmautomate.com/switch/switch-to-default) [Switch to framechevron-right](https://docs.gpmautomate.com/switch/switch-to-frame) [Switch to popupchevron-right](https://docs.gpmautomate.com/switch/switch-to-popup) [PreviousScroll to elementchevron-left](https://docs.gpmautomate.com/scroll/scroll-to-element) [NextSwitch to defaultchevron-right](https://docs.gpmautomate.com/switch/switch-to-default) --- # Google service | GPM Automate VI [Read google sheetchevron-right](https://docs.gpmautomate.com/google-service/read-google-sheet) [Write google sheetchevron-right](https://docs.gpmautomate.com/google-service/write-google-sheet) [PreviousCall functionchevron-left](https://docs.gpmautomate.com/references/call-function) [NextRead google sheetchevron-right](https://docs.gpmautomate.com/google-service/read-google-sheet) Last updated 9 months ago --- # Cookie | GPM Automate VI [hashtag](https://docs.gpmautomate.com/cookie#mot-so-van-de-can-chu-y) Một số vấn đề cần chú ý: ---------------------------------------------------------------------------------------------------- 1. Trước khi thực hiện action Import cookie hoặc Export cookie, bạn cần dùng action Go to URL để truy cập vào trang web cần import/export trước. 2. Có một số trang web khi import cookie bằng automation sẽ bị mất cookie sau khi tắt trình duyệt. Với các trang dạng này, bạn hãy tìm cách xử lý khác. [PreviousSwitch to popupchevron-left](https://docs.gpmautomate.com/switch/switch-to-popup) [NextImport cookiechevron-right](https://docs.gpmautomate.com/cookie/import-cookie) Last updated 1 year ago --- # Alert | GPM Automate VI [Accept alertchevron-right](https://docs.gpmautomate.com/alert/accept-alert) [Cancel alertchevron-right](https://docs.gpmautomate.com/alert/cancel-alert) [PreviousExport cookiechevron-left](https://docs.gpmautomate.com/cookie/export-cookie) [NextAccept alertchevron-right](https://docs.gpmautomate.com/alert/accept-alert) --- # References | GPM Automate VI [Call functionchevron-right](https://docs.gpmautomate.com/references/call-function) [PreviousGet extension idchevron-left](https://docs.gpmautomate.com/javascript/get-extension-id) [NextCall functionchevron-right](https://docs.gpmautomate.com/references/call-function) --- # Normal block | GPM Automate VI [PreviousCác blockchevron-left](https://docs.gpmautomate.com/no-code-automation/cac-block) [NextForchevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/for) Last updated 1 year ago --- # While | GPM Automate VI [hashtag](https://docs.gpmautomate.com/no-code-automation/cac-block/while#cac-dieu-kien-trong-vong-lap-while) Các điều kiện trong vòng lặp While ----------------------------------------------------------------------------------------------------------------------------------------------------- Điều kiện Chức năng \> Lớn hơn, áp dụng cho kiểu dữ liệu là số < Nhỏ hơn, áp dụng cho kiểu dữ liệu là số \>= Lớn hơn hoặc bằng, áp dụng cho kiểu dữ liệu là số <= Nhỏ hơn hoặc bằng, áp dụng cho kiểu dữ liệu là số \= Áp dụng cho cả kiểu dữ liệu số và chuỗi VD: 3 = 3 -> true hello = hola -> false != Áp dụng cho cả kiểu dữ liệu số và chuỗi Phủ định của điều kiện = VD: 3 != 4 -> true hello != hello -> false hasElement(XPATH) Điều kiện xuất hiện một element !hasElement(XPATH) Điều kiện **không** xuất hiện một element, tức là phủ định của hasElement(XPATH) A contains B Kiểm tra xem chuỗi A có chứa chuỗi B không VD: ABCD contains AB -> true (đúng) AB contains ABCD -> false (sai) !A contains B Kiểm tra xem chuỗi A có **KHÔNG** chứa chuỗi B không VD: !ABCD contains AB -> false (sai) !AB contains ABCD -> true (đúng) contains B Kiểm tra xem chuỗi B có phải là chuỗi rỗng hay không (rỗng chứa B) -> True (rỗng), False (không rỗng) [PreviousForchevron-left](https://docs.gpmautomate.com/no-code-automation/cac-block/for) [NextIfchevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/if) Last updated 7 months ago --- # For | GPM Automate VI [hashtag](https://docs.gpmautomate.com/no-code-automation/cac-block/for#cac-tham-so-trong-vong-lap-for) Các tham số trong vòng lặp For ------------------------------------------------------------------------------------------------------------------------------------------- Tham số Giải thích `$loopIndex` `$loopIndex` theo dõi số lần lặp trong một vòng lặp, giúp xác định và truy cập từng phần tử trong danh sách hoặc mảng Start Giá trị bắt đầu của biến lặp `$loopIndex` End Giá trị kết thúc của biến lặp `$loopIndex` là End-1 Increase by Bước nhảy của biến lặp `$loopIndex` Ví dụ: Kết hợp For để đọc file Input Excel. Giả sử bạn cần đọc dữ liệu tất cả dữ liệu từ cột B từ 1 file excel tên là test. Dùng biến **$inputExcelTotalRows** kết hợp với For. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252Fp77KIHUYEHU70rYS1mEu%252Fimage.png%3Falt%3Dmedia%26token%3D8537b831-2a30-4585-a8fe-e28d3f4a4a9c&width=768&dpr=3&quality=100&sign=e1c76f5e&sv=2) Input Excel ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FeKABnpQ9OQDZmqs037Sd%252Fimage.png%3Falt%3Dmedia%26token%3D468c366b-97ac-4381-a929-0fe28a9dbeb0&width=768&dpr=3&quality=100&sign=c37ca56a&sv=2) For ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FMaI3k6KgCrbPiNybZoQN%252Fimage.png%3Falt%3Dmedia%26token%3D3ca1102a-70c8-4f31-bbcf-24cbe6cbd800&width=768&dpr=3&quality=100&sign=acf9b2ca&sv=2) Set variable [PreviousNormal blockchevron-left](https://docs.gpmautomate.com/no-code-automation/cac-block/normal-block) [NextWhilechevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/while) Last updated 9 months ago --- # Else | GPM Automate VI [PreviousElse ifchevron-left](https://docs.gpmautomate.com/no-code-automation/cac-block/else-if) [NextVariableschevron-right](https://docs.gpmautomate.com/no-code-automation/variables) --- # Increase variable | GPM Automate VI [PreviousSet variablechevron-left](https://docs.gpmautomate.com/no-code-automation/variables/set-variable) [NextDecrease variablechevron-right](https://docs.gpmautomate.com/no-code-automation/variables/decrease-variable) Last updated 1 year ago --- # Else if | GPM Automate VI [hashtag](https://docs.gpmautomate.com/no-code-automation/cac-block/else-if#cac-dieu-kien-trong-khoi-re-nhanh-if-else-if-else) Các điều kiện trong khối rẽ nhánh (If, Else if, Else) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Điều kiện Chức năng \> Lớn hơn, áp dụng cho kiểu dữ liệu là số < Nhỏ hơn, áp dụng cho kiểu dữ liệu là số \>= Lớn hơn hoặc bằng, áp dụng cho kiểu dữ liệu là số <= Nhỏ hơn hoặc bằng, áp dụng cho kiểu dữ liệu là số \= Áp dụng cho cả kiểu dữ liệu số và chuỗi VD: 3 = 3 -> true hello = hola -> false != Áp dụng cho cả kiểu dữ liệu số và chuỗi Phủ định của điều kiện = VD: 3 != 4 -> true hello != hello -> false hasElement(XPATH) Điều kiện xuất hiện một element !hasElement(XPATH) Điều kiện **không** xuất hiện một element, tức là phủ định của hasElement(XPATH) A contains B Kiểm tra xem chuỗi A có chứa chuỗi B không VD: ABCD contains AB -> true (đúng) AB contains ABCD -> false (sai) !A contains B Kiểm tra xem chuỗi A có **KHÔNG** chứa chuỗi B không VD: !ABCD contains AB -> false (sai) !AB contains ABCD -> true (đúng) contains B Kiểm tra xem chuỗi B có phải là chuỗi rỗng hay không (rỗng chứa B) -> True (rỗng), False (không rỗng) [PreviousIfchevron-left](https://docs.gpmautomate.com/no-code-automation/cac-block/if) [NextElsechevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/else) Last updated 7 months ago --- # If | GPM Automate VI [hashtag](https://docs.gpmautomate.com/no-code-automation/cac-block/if#cac-dieu-kien-trong-khoi-re-nhanh-if-else-if-else) Các điều kiện trong khối rẽ nhánh (If, Else if, Else) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Điều kiện Chức năng \> Lớn hơn, áp dụng cho kiểu dữ liệu là số < Nhỏ hơn, áp dụng cho kiểu dữ liệu là số \>= Lớn hơn hoặc bằng, áp dụng cho kiểu dữ liệu là số <= Nhỏ hơn hoặc bằng, áp dụng cho kiểu dữ liệu là số \= Áp dụng cho cả kiểu dữ liệu số và chuỗi VD: 3 = 3 -> true hello = hola -> false != Áp dụng cho cả kiểu dữ liệu số và chuỗi Phủ định của điều kiện = VD: 3 != 4 -> true hello != hello -> false hasElement(XPATH) Điều kiện xuất hiện một element !hasElement(XPATH) Điều kiện **không** xuất hiện một element, tức là phủ định của hasElement(XPATH) A contains B Kiểm tra xem chuỗi A có chứa chuỗi B không VD: ABCD contains AB -> true (đúng) AB contains ABCD -> false (sai) !A contains B Kiểm tra xem chuỗi A có **KHÔNG** chứa chuỗi B không VD: !ABCD contains AB -> false (sai) !AB contains ABCD -> true (đúng) contains B Kiểm tra xem chuỗi B có phải là chuỗi rỗng hay không (rỗng chứa B) -> True (rỗng), False (không rỗng) [PreviousWhilechevron-left](https://docs.gpmautomate.com/no-code-automation/cac-block/while) [NextElse ifchevron-right](https://docs.gpmautomate.com/no-code-automation/cac-block/else-if) Last updated 8 months ago --- # Decrease variable | GPM Automate VI [PreviousIncrease variablechevron-left](https://docs.gpmautomate.com/no-code-automation/variables/increase-variable) [NextCountchevron-right](https://docs.gpmautomate.com/no-code-automation/variables/count) --- # Set variable | GPM Automate VI Để cho phép người dùng nhập giá trị biến từ UI, chọn mục Allow user input from the interface. Có 4 kiểu Input như sau: 1. Text (để nhập 1 giá trị text) ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FuUjaA3n7JoQCLrdolTl1%252F1.JPG%3Falt%3Dmedia%26token%3Da30a99fa-fba7-4431-8ad0-97b364dbf664&width=768&dpr=3&quality=100&sign=4920f607&sv=2) Text ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FSNBhG9g4KpScxAXNleM9%252Fimage.png%3Falt%3Dmedia%26token%3D0d22bd27-9de8-4740-96ef-cfb75fa050a0&width=768&dpr=3&quality=100&sign=5dec7c5f&sv=2) Text Ví dụ như ở hình trên, khi người dùng nhập nội dung `hello world` vào ô nhập liệu, giá trị của biến `$textContent` sẽ là `hello world` ($textContent=hello world). 1. File (dùng để chọn file trong máy tính) ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F25R4dIZ8AqrjI7imlwrP%252F2.JPG%3Falt%3Dmedia%26token%3D69ce21c7-3f21-4bff-9b23-45bd9e1af5f0&width=768&dpr=3&quality=100&sign=26f43adc&sv=2) File ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F2jCepWHvgBP7fNUJ34Po%252Fimage.png%3Falt%3Dmedia%26token%3D0100ca4b-b3bb-4dec-9270-1cd8933c0583&width=768&dpr=3&quality=100&sign=e3ebbc2e&sv=2) File Ví dụ như ở hình trên, chọn vào dấu 3 chấm được khoanh đỏ, sau đó chọn file có tên `bruh.png`. Khi đó giá trị của biến `$filePath` sẽ là `D:\materials\bruh.png` ($filePath=D:\\materials\\bruh.png). Sau đó có thể dùng biến này cho action File Upload chẳng hạn. 1. Checkbox **Check Box** là thành phần giao diện cho phép người dùng bật/tắt một tùy chọn. Khi được tích chọn, giá trị trả về là **True**; khi bỏ chọn, giá trị là **False**. **Đặc điểm:** * Biểu thị lựa chọn nhị phân (có/không, bật/tắt, đồng ý/không đồng ý). **Ví dụ sử dụng:** * Đồng ý với điều khoản và điều kiện. * Bật/tắt một tính năng (ví dụ: gửi email thông báo). ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F1HG1KmScgFjSRgqAENjV%252Fimage.png%3Falt%3Dmedia%26token%3D8987a054-3006-457d-a34c-10364511c569&width=768&dpr=3&quality=100&sign=b2c573fb&sv=2) Checkbox ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252Fu1Oi0rK57lw8ajjDDZ3H%252Fimage.png%3Falt%3Dmedia%26token%3D5b2fd262-3992-4341-947b-524b085a6c13&width=768&dpr=3&quality=100&sign=c5f53f02&sv=2) Checkbox Ví dụ như ở hình trên, khi tích chọn vào mục `Chọn để đặt hàng / Check to place an order`, thì biến `$checkBox` sẽ nhận giá trị True ($checkBox=True), và ngược lại. 1. Combobox **Combo Box** (tương tự như dropdown) là thành phần giao diện cho phép người dùng chọn **một giá trị duy nhất** từ danh sách có sẵn. Tính năng này giúp đơn giản hóa thao tác nhập liệu, tránh sai sót và giữ dữ liệu đồng nhất. **Đặc điểm:** * Hiển thị danh sách các lựa chọn có sẵn. * Chỉ chọn được **một giá trị tại một thời điểm**. **Ví dụ sử dụng:** * Chọn quốc gia, ngành hàng hoặc loại sản phẩm. * Chọn trạng thái (VD: Hoạt động / Ngưng hoạt động). ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FRA68AMqUj256pc6uEXqB%252Fimage.png%3Falt%3Dmedia%26token%3Df25fa949-61ae-4d8d-a8cf-194e2958afed&width=768&dpr=3&quality=100&sign=1469316a&sv=2) Combo Box ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FkKTMsZSrxpq4qWAT4Mxv%252Fimage.png%3Falt%3Dmedia%26token%3D93305159-aa0b-47de-9b24-2465a40fcfa9&width=768&dpr=3&quality=100&sign=83af25c1&sv=2) Combo Box Ví dụ như ở hình trên, khi người dùng chọn `United States`, thì biến `$country` trong Automate sẽ nhận giá trị là `United States` ($country=United State). [PreviousVariableschevron-left](https://docs.gpmautomate.com/no-code-automation/variables) [NextIncrease variablechevron-right](https://docs.gpmautomate.com/no-code-automation/variables/increase-variable) Last updated 5 months ago --- # Count | GPM Automate VI Có thể dụng khi đếm số dòng của 1 file text, hay dùng để lấy số lượng file khi dùng action Folder get file list. [hashtag](https://docs.gpmautomate.com/no-code-automation/variables/count#vi-du-cho-action-count) Ví dụ cho action Count ----------------------------------------------------------------------------------------------------------------------------- 1. Đếm số lượng dòng trong file text. Dùng 2 action là File read all lines và Count như hình dưới. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FqXHGaLsGvQYoofqHIdTz%252Fimage.png%3Falt%3Dmedia%26token%3Df0311b32-7aa7-4624-a7d6-6ef66bb49561&width=768&dpr=3&quality=100&sign=be24125d&sv=2) File read all lines ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FEsLON5qFwAPfF9kgsLa2%252Fimage.png%3Falt%3Dmedia%26token%3Df4509470-0345-41a0-a224-2e17cdd21ee7&width=768&dpr=3&quality=100&sign=a15b690a&sv=2) Count 2. Đếm số lượng file trong 1 folder khi dùng action Folder get file list. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FW9yDVNJWnyS9H2lkCPWv%252Fimage.png%3Falt%3Dmedia%26token%3Ddbe6eaf1-bc38-4623-aa6c-51793e38e097&width=768&dpr=3&quality=100&sign=ceaf6306&sv=2) Folder get file list ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FtwcHFW04xjzQZquJNXql%252Fimage.png%3Falt%3Dmedia%26token%3D26dc428a-3d1d-4f64-98e2-7e7deb57b3c8&width=768&dpr=3&quality=100&sign=3a7d816d&sv=2) Count 3. Đếm số phần tử trong danh sách sau khi tách chuỗi bằng Split text. Ví dụ: Có 1 chuỗi đầu vào là `hello|my|name|is|GPM|Automate` ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252Fii3NsJAsK0eAjHtZarS1%252Fimage.png%3Falt%3Dmedia%26token%3D8e6501ae-ab6c-4ee3-a7cf-a214081f7bbe&width=768&dpr=3&quality=100&sign=ca27859e&sv=2) Split text ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FCO3rpyFsbdmpWadzpdpp%252Fimage.png%3Falt%3Dmedia%26token%3D0b986e14-1eec-4aea-a680-ec0f750488f6&width=768&dpr=3&quality=100&sign=7f9aae71&sv=2) Count Chuỗi được ngăn cách bởi dấu |. Sau khi dùng action Split text, biến count sẽ đếm được số phần tử sau khi tách chuỗi (như ở ví dụ trên thì count sẽ có giá trị là 6). [PreviousDecrease variablechevron-left](https://docs.gpmautomate.com/no-code-automation/variables/decrease-variable) [NextWorkflowchevron-right](https://docs.gpmautomate.com/no-code-automation/workflow) Last updated 5 months ago --- # Delay | GPM Automate VI Min (ms): Thời gian dừng chờ tối thiểu. Max (ms): Thời gian dừng chờ tối đa. VD: Min là 2000, Max là 4000. Thì thời gian dừng chờ sẽ là 1 số ngẫu nhiên trong khoảng từ 2000 tới 4000. Ví dụ 2843ms. [PreviousNext loopchevron-left](https://docs.gpmautomate.com/no-code-automation/workflow/next-loop) [NextText & numberchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number) Last updated 1 year ago --- # Element | GPM Automate VI [Wait elementchevron-right](https://docs.gpmautomate.com/element/wait-element) [Get element attributechevron-right](https://docs.gpmautomate.com/element/get-element-attribute) [Get element textchevron-right](https://docs.gpmautomate.com/element/get-element-text) [Count elementchevron-right](https://docs.gpmautomate.com/element/count-element) [PreviousWait URL Changedchevron-left](https://docs.gpmautomate.com/navigation/wait-url-changed) [NextWait elementchevron-right](https://docs.gpmautomate.com/element/wait-element) --- # Next loop | GPM Automate VI [PreviousExit loopchevron-left](https://docs.gpmautomate.com/no-code-automation/workflow/exit-loop) [NextDelaychevron-right](https://docs.gpmautomate.com/no-code-automation/workflow/delay) --- # Mouse | GPM Automate VI [Mouse clickchevron-right](https://docs.gpmautomate.com/mouse/mouse-click) [Mouse try to clickchevron-right](https://docs.gpmautomate.com/mouse/mouse-try-to-click) [Mouse movechevron-right](https://docs.gpmautomate.com/mouse/mouse-move) [Mouse press and holdchevron-right](https://docs.gpmautomate.com/mouse/mouse-press-and-hold) [Mouse releasechevron-right](https://docs.gpmautomate.com/mouse/mouse-release) [Mouse scrollchevron-right](https://docs.gpmautomate.com/mouse/mouse-scroll) [PreviousCount elementchevron-left](https://docs.gpmautomate.com/element/count-element) [NextMouse clickchevron-right](https://docs.gpmautomate.com/mouse/mouse-click) --- # Keyboard | GPM Automate VI [Key presschevron-right](https://docs.gpmautomate.com/keyboard/key-press) [File uploadchevron-right](https://docs.gpmautomate.com/keyboard/file-upload) [Select dropdownchevron-right](https://docs.gpmautomate.com/keyboard/select-dropdown) [PreviousMouse scrollchevron-left](https://docs.gpmautomate.com/mouse/mouse-scroll) [NextKey presschevron-right](https://docs.gpmautomate.com/keyboard/key-press) --- # Scroll | GPM Automate VI [Random scrollchevron-right](https://docs.gpmautomate.com/scroll/random-scroll) [Scroll to topchevron-right](https://docs.gpmautomate.com/scroll/scroll-to-top) [Scroll to bottomchevron-right](https://docs.gpmautomate.com/scroll/scroll-to-bottom) [Scroll to elementchevron-right](https://docs.gpmautomate.com/scroll/scroll-to-element) [PreviousSelect dropdownchevron-left](https://docs.gpmautomate.com/keyboard/select-dropdown) [NextRandom scrollchevron-right](https://docs.gpmautomate.com/scroll/random-scroll) --- # Exit loop | GPM Automate VI [PreviousWorkflowchevron-left](https://docs.gpmautomate.com/no-code-automation/workflow) [NextNext loopchevron-right](https://docs.gpmautomate.com/no-code-automation/workflow/next-loop) --- # Random text | GPM Automate VI [PreviousText & numberchevron-left](https://docs.gpmautomate.com/no-code-automation/text-and-number) [NextSplit textchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/split-text) Last updated 1 year ago --- # Split text | GPM Automate VI VD: Có 1 chuỗi đầu vào là `hello|my|name|is|GPM|Automate` Kết quả trả về là mảng ký tự `a`. Từ đó có thể lấy được các đoạn text được ngăn cách bởi dấu | như sau: `$a[0] = hello $a[1] = my $a[2] = name $a[3] = is $a[4] = GPM $a[5] = Automate` **Chú ý:** Chỉ số của mảng ký tự bắt đầu từ 0. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FpkGXkgFQjw22tiLfZtkw%252Fimage.png%3Falt%3Dmedia%26token%3D7a86ec94-ed13-4740-94da-e01d71d6c6e4&width=768&dpr=3&quality=100&sign=3d64c68&sv=2) Split text [PreviousRandom textchevron-left](https://docs.gpmautomate.com/no-code-automation/text-and-number/random-text) [NextRead jsonchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/read-json) Last updated 1 year ago --- # Read json | GPM Automate VI Ví dụ: Bạn có 1 HTTP Request như sau: `GET``https://tools.dongvanfb.net/api/[[email protected]](https://docs.gpmautomate.com/cdn-cgi/l/email-protection) &pass=bV1emc&type_get=imap` ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FxnDjnEPGJ7JLzC1oIlbn%252Fimage.png%3Falt%3Dmedia%26token%3Dcb245d44-2b05-4e12-9b66-8cacb72885df&width=768&dpr=3&quality=100&sign=a2a4329e&sv=2) HTTP Request ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FPEDUCoMQs3EuX6pWh61S%252Fimage.png%3Falt%3Dmedia%26token%3De8922bd6-f8ca-471b-9746-c54c9d94b8e9&width=768&dpr=3&quality=100&sign=f1f350a0&sv=2) HTTP Request Kết quả trả về là 1 JSON như sau: Response Để lấy giá trị `code ("37589")` bạn viết như sau: ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F6VulKXut7GDC2dWNUfb4%252Fimage.png%3Falt%3Dmedia%26token%3D7d759114-d2a4-4fa9-a948-bfde1a01624e&width=768&dpr=3&quality=100&sign=62171e68&sv=2) Read JSON Giá trị của `code` sẽ được lưu vào biến `$ketQuaCode`. Để lấy giá trị của các thuộc tính ở tầng thấp hơn, ví dụ `date ("15/04/2022")` nằm trong `timestamp`, bạn làm như sau: ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FAyFnRbQQa2yziesKV1NB%252Fimage.png%3Falt%3Dmedia%26token%3Df6ec7308-33d5-4205-9c6e-d52a29619d6c&width=768&dpr=3&quality=100&sign=7b175d20&sv=2) Read JSON Giá trị của `date` sẽ được lưu vào biến `$ketQuaDate`. Đối với các JSON có cả mảng dữ liệu, ví dụ như JSON `$resp` sau: Response Để lấy giá trị `date` của user thứ 2, bạn viết như sau: Ở đây `users.[1].timestamp.date`, thì `[1]` là index của mảng. Index này bắt đầu tính từ 0. Bạn cũng có thể nhúng giá trị index từ 1 biến khác vào, ví dụ `[$index]`. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F14QgDx7z0BIfAeWXBipZ%252Fimage.png%3Falt%3Dmedia%26token%3D2a3c7e2d-3345-4b1a-8fe7-6fd7db8de06b&width=768&dpr=3&quality=100&sign=c4932133&sv=2) Read JSON ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FhaQFmZ3QYUX4sE412UhD%252Fimage.png%3Falt%3Dmedia%26token%3D33ce0cf3-3f72-4465-9004-28dc199c7f6b&width=768&dpr=3&quality=100&sign=e87bcb57&sv=2) Read JSON [PreviousSplit textchevron-left](https://docs.gpmautomate.com/no-code-automation/text-and-number/split-text) [NextRegexchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/regex) Last updated 1 year ago Copy { "user": { "email": "[email protected]", "password": "bV1emc" }, "status": true, "code": "37589", "timestamp": { "date": "15/04/2022", "time": "22:43" } } Copy { "success": true, "users": [\ {\ "email": "[email protected]",\ "password": "bV1emc",\ "status": true,\ "code": "37589",\ "timestamp": {\ "date": "15/04/2022",\ "time": "22:43"\ }\ },\ {\ "email": "[email protected]",\ "password": "ax1Ym",\ "status": true,\ "code": "18554",\ "timestamp": {\ "date": "05/09/2024",\ "time": "15:12"\ }\ }\ ] } --- # Random number | GPM Automate VI [PreviousRegexchevron-left](https://docs.gpmautomate.com/no-code-automation/text-and-number/regex) [NextMath executechevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/math-execute) --- # Math execute | GPM Automate VI [PreviousRandom numberchevron-left](https://docs.gpmautomate.com/no-code-automation/text-and-number/random-number) [Next2FA codechevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/2fa-code) --- # Regex | GPM Automate VI **Ví dụ:** Câu: _"Tôi có 3 con mèo và 12 con chó"_ Để trích xuất các số **3** và **12**, ta dùng biểu thức: `\d+` Đây chính là **regex** (viết tắt của _regular expression_ – biểu thức chính quy). Cú pháp này không viết ngẫu nhiên mà tuân theo các quy tắc rõ ràng. Để tìm hiểu thêm về regex, bạn có thể hỏi ChatGPT, tra Google hoặc xem các video hướng dẫn trên YouTube. **Ví dụ thực tế:** Khi làm automation để lấy mã OTP từ email. Ví dụ email có nội dung: _"Mã xác thực của bạn là 843921. Vui lòng không chia sẻ mã này."_ Ta dùng biểu thức: `\b\d{6}\b` để lấy chính xác đoạn **6 chữ số** là **843921**. Biểu thức này có nghĩa là: tìm **1 đoạn 6 số tách biệt**, thường dùng cho mã xác thực. Cách viết regex cụ thể theo từng tình huống, bạn có thể nhờ ChatGPT hỗ trợ. Ở đây chỉ là ví dụ minh họa. Cách điền như sau: ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F8QEi9WrNPDR3wEsCcMX2%252Fimage.png%3Falt%3Dmedia%26token%3D2356a919-5950-44ff-8d36-8fd570e325e1&width=768&dpr=3&quality=100&sign=c70f5b09&sv=2) Regex [PreviousRead jsonchevron-left](https://docs.gpmautomate.com/no-code-automation/text-and-number/read-json) [NextRandom numberchevron-right](https://docs.gpmautomate.com/no-code-automation/text-and-number/random-number) Last updated 7 months ago --- # 2FA code | GPM Automate VI **Chú ý:** Để action này trả về đúng code cần đồng bộ giờ trong cài đặt của máy tính về chuẩn giờ Internet. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FzOOYCaA02Qj9mpReI4hp%252Fimage.png%3Falt%3Dmedia%26token%3Da88b0309-70d8-4ee0-8bda-9580f33e027e&width=768&dpr=3&quality=100&sign=bf2580d3&sv=2) PC Settings ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FkFUYPKtZgC2TOVahQ8Tr%252Fimage.png%3Falt%3Dmedia%26token%3D7763bd0c-9b95-4a6f-ada5-5a3397a36a42&width=768&dpr=3&quality=100&sign=9f5a614d&sv=2) Ví dụ Kết quả sẽ được lưu vào biến $code. Bạn cũng có thể nhúng Secret Key từ các biến khác hoặc từ Input Excel. Ví dụ Secret Key được lưu ở cột B thì điền $inputExcel\[B\]. [PreviousMath executechevron-left](https://docs.gpmautomate.com/no-code-automation/text-and-number/math-execute) [NextFile & Folderchevron-right](https://docs.gpmautomate.com/file-and-folder) Last updated 6 months ago --- # Copy file | GPM Automate VI Gồm 2 tham số: Source File: Đường dẫn của file cần copy. Destination File: Đường dẫn file nơi copy đến. [PreviousFile existschevron-left](https://docs.gpmautomate.com/file-and-folder/file-exists) [NextMove/rename filechevron-right](https://docs.gpmautomate.com/file-and-folder/move-rename-file) Last updated 1 year ago --- # File exists | GPM Automate VI [PreviousFile & Folderchevron-left](https://docs.gpmautomate.com/file-and-folder) [NextCopy filechevron-right](https://docs.gpmautomate.com/file-and-folder/copy-file) --- # Set clipboard text | GPM Automate VI [PreviousGet clipboard textchevron-left](https://docs.gpmautomate.com/clipboard/get-clipboard-text) [NextHTTPchevron-right](https://docs.gpmautomate.com/http) Last updated 1 year ago --- # Get clipboard text | GPM Automate VI [PreviousClipboardchevron-left](https://docs.gpmautomate.com/clipboard) [NextSet clipboard textchevron-right](https://docs.gpmautomate.com/clipboard/set-clipboard-text) --- # HTTP Download | GPM Automate VI [hashtag](https://docs.gpmautomate.com/http/http-download#giai-thich-them-ve-1-so-thong-so-khi-dung-action-http-download) Giải thích thêm về 1 số thông số khi dùng action HTTP Download --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FdlGHrkCRw4p6MjuEpiPh%252Fimage.png%3Falt%3Dmedia%26token%3D980c5dad-9ca8-4ce4-9586-cf8af1cc9514&width=768&dpr=3&quality=100&sign=664e3a57&sv=2) HTTP Download ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FcdGHzdZ25jsSsJrlyZYc%252Fimage.png%3Falt%3Dmedia%26token%3Dc8df6ca8-b33f-4920-b835-b2b1aba95708&width=768&dpr=3&quality=100&sign=d0a3f0ef&sv=2) HTTP Download * **URL**: Nhập đường dẫn trực tiếp đến file (direct URL). * **Save path**: Nhập đường dẫn đầy đủ bao gồm **tên file** bạn muốn lưu (không chỉ là thư mục). _Ví dụ:_ `D:\Downloads\file_name.jpg` * **Output**: Trả về `True` nếu tải thành công, `False` nếu thất bại. Có thể kết hợp với vòng lặp **For** và lệnh **HTTP Download** để thử tải lại trong trường hợp file bị chậm hoặc khó tải. (Sử dụng điều kiện `If`, nếu biến output là True thì dùng `ExitLoop` để thoát vòng lặp.) [PreviousHTTP Requestchevron-left](https://docs.gpmautomate.com/http/http-request) [NextImage Searchchevron-right](https://docs.gpmautomate.com/image-search) Last updated 6 months ago --- # ChatGPT | GPM Automate VI [hashtag](https://docs.gpmautomate.com/ai/chatgpt#giai-thich-them-ve-cac-thong-so-cua-action-chatgpt) Giải thích thêm về các thông số của action ChatGPT ------------------------------------------------------------------------------------------------------------------------------------------------------------- 1. **GPT API:** Điền secret key api lấy từ tài khoản ChatGPT của bạn. 2. **GPT Model:** Điền model của bạn, ví dụ: gpt-3.5-turbo, gpt-3.5-turbo-0125,... 3. **Prompt:** Điền câu hỏi hoặc yêu cầu mà bạn muốn ChatGPT trả lời. [PreviousAIchevron-left](https://docs.gpmautomate.com/ai) [NextMailchevron-right](https://docs.gpmautomate.com/mail) Last updated 1 year ago --- # File read all text | GPM Automate VI [PreviousDelete filechevron-left](https://docs.gpmautomate.com/file-and-folder/delete-file) [NextFile read all lineschevron-right](https://docs.gpmautomate.com/file-and-folder/file-read-all-lines) --- # Delete file | GPM Automate VI [PreviousMove/rename filechevron-left](https://docs.gpmautomate.com/file-and-folder/move-rename-file) [NextFile read all textchevron-right](https://docs.gpmautomate.com/file-and-folder/file-read-all-text) --- # Move/rename file | GPM Automate VI Gồm 2 tham số: Source File: Đường dẫn của file cần move/ rename. Destination File: Đường dẫn file nơi move đến/ Đường dẫn file mới sau khi đổi tên. [PreviousCopy filechevron-left](https://docs.gpmautomate.com/file-and-folder/copy-file) [NextDelete filechevron-right](https://docs.gpmautomate.com/file-and-folder/delete-file) Last updated 1 year ago --- # File write all text | GPM Automate VI Như ở hình dưới, sẽ xoá toàn bộ nội dung của file D:\\1.txt, sau đó ghi nội dung "nocode automation" vào file này. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FU7jQDs0AvU6u8K0AoPq7%252Fimage.png%3Falt%3Dmedia%26token%3D1c1475a5-c70d-45e8-ba6d-4fc8328051b1&width=768&dpr=3&quality=100&sign=1fa67503&sv=2) File write all text Chú ý: Có thể dùng File write all text để tạo 1 file text trống. Như ở hình trên, phần Text mình sẽ bỏ trống. [PreviousFile read all lineschevron-left](https://docs.gpmautomate.com/file-and-folder/file-read-all-lines) [NextFile append linechevron-right](https://docs.gpmautomate.com/file-and-folder/file-append-line) Last updated 6 months ago --- # Image exists | GPM Automate VI Kết quả trả về dưới dạng True/False. [hashtag](https://docs.gpmautomate.com/image-search/image-exists#giai-thich-them-ve-cac-tham-so-trong-action-image) Giải thích thêm về các tham số trong action Image -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Threshold: Độ chính xác của hình ảnh. Giá trị nằm trong khoảng từ 0-1. Threshold càng cao thì yêu cầu độ chính xác của hình ảnh càng cao, nhưng thời gian tìm hình ảnh sẽ lâu hơn. Nếu không điền thì giá trị mặc định là 0.7 (độ chính xác tương đối). **Chú ý:** Hãy đảm bảo tỉ lệ scale của trang web lúc bạn screenshot ảnh phải giống với tỉ lệ scale lúc bạn chạy thực tế. Nếu không tính năng này sẽ không hoạt động. [PreviousWait to imagechevron-left](https://docs.gpmautomate.com/image-search/wait-to-image) [NextImage searchchevron-right](https://docs.gpmautomate.com/image-search/image-search) Last updated 1 year ago --- # Wait to image | GPM Automate VI [hashtag](https://docs.gpmautomate.com/image-search/wait-to-image#giai-thich-them-ve-cac-tham-so-trong-action-image) Giải thích thêm về các tham số trong action Image --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Threshold: Độ chính xác của hình ảnh. Giá trị nằm trong khoảng từ 0-1. Threshold càng cao thì yêu cầu độ chính xác của hình ảnh càng cao, nhưng thời gian tìm hình ảnh sẽ lâu hơn. Nếu không điền thì giá trị mặc định là 0.7 (độ chính xác tương đối). **Chú ý:** Hãy đảm bảo tỉ lệ scale của trang web lúc bạn screenshot ảnh phải giống với tỉ lệ scale lúc bạn chạy thực tế. Nếu không tính năng này sẽ không hoạt động. [PreviousImage Searchchevron-left](https://docs.gpmautomate.com/image-search) [NextImage existschevron-right](https://docs.gpmautomate.com/image-search/image-exists) Last updated 1 year ago --- # HTTP Request | GPM Automate VI [hashtag](https://docs.gpmautomate.com/http/http-request#giai-thich-them-ve-1-so-thong-so-khi-dung-action-http-request) Giải thích thêm về 1 số thông số khi dùng action HTTP Request ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 1. **URL:** Địa chỉ của tài nguyên trên server. 2. **Method:** Phương thức HTTP để thực hiện yêu cầu, ví dụ: GET, POST, PUT, DELETE,... 3. **Header:** Thông tin bổ sung gửi kèm yêu cầu, chẳng hạn như loại nội dung và thông tin xác thực. VD: Authorization: Bearer ,... 4. **Data:** Dữ liệu gửi kèm trong yêu cầu (chỉ áp dụng cho một số phương thức như POST và PUT) (chính là body/payload). 5. **Use profile's proxy:** Sử dụng proxy của profile khi thực hiện request thay vì dùng local ip. **Ví dụ 1:** Với dạng body **application/json** thì phần body điền theo định dạng: ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FjXYZdFzaipdgLMEx9LXr%252Fimage.png%3Falt%3Dmedia%26token%3D2b8e9de9-d770-45d0-98ce-6edacd25821d&width=768&dpr=3&quality=100&sign=f3b394ec&sv=2) HTTP Request 1 ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FIYhiKFOlUCQIPmvrY5Xp%252Fimage.png%3Falt%3Dmedia%26token%3D725587a2-69b3-4f63-88da-536019704fa3&width=768&dpr=3&quality=100&sign=57510e82&sv=2) HTTP Request 2 **Ví dụ 2:** Với dạng body **application/x-www-form-urlencoded** thì phần body điền theo định dạng: key1=value1&key2=value2&key3=value3 (các cặp key-value nối với nhau bởi dấu &) ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F2XBE5zq5x6x03GVZngmI%252Fimage.png%3Falt%3Dmedia%26token%3Da30c5586-5b55-4bdd-8bfc-9ce132603f55&width=768&dpr=3&quality=100&sign=1481024&sv=2) Postman ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FhOsgTcqtgUZW9sLutCxv%252Fimage.png%3Falt%3Dmedia%26token%3Dfc2ec9c8-86ed-4671-ad61-a067a45b5f37&width=768&dpr=3&quality=100&sign=d154f98f&sv=2) HTTP Request 1 ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FGMHmTPmtwTwwtbDCZR1Z%252Fimage.png%3Falt%3Dmedia%26token%3Dc4a670e1-7f3b-421c-b45f-5c41b650defd&width=768&dpr=3&quality=100&sign=b5f5a96e&sv=2) HTTP Request 2 **Ví dụ 3:** Với dạng body **multipart/form-data** thì phần body điền theo định dạng: ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FJaa20NLWVUSlQHWFYrI2%252Fimage.png%3Falt%3Dmedia%26token%3Da6a82b3a-fd56-42d1-9f3f-ddaeff544d81&width=768&dpr=3&quality=100&sign=29a12147&sv=2) Postman ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FAtmhIt0tJ8EX3aBrlsdz%252Fimage.png%3Falt%3Dmedia%26token%3Da0d26808-029e-4cfa-aeb2-0118c34f0122&width=768&dpr=3&quality=100&sign=2c4c47e9&sv=2) HTTP Request 1 ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F2AR4vYFOY9NjT0DLDl1j%252Fimage.png%3Falt%3Dmedia%26token%3D1794a7e4-aa85-430b-b924-66c450ec907b&width=768&dpr=3&quality=100&sign=fd99effb&sv=2) HTTP Request 2 [PreviousHTTPchevron-left](https://docs.gpmautomate.com/http) [NextHTTP Downloadchevron-right](https://docs.gpmautomate.com/http/http-download) Last updated 7 months ago --- # File append line | GPM Automate VI Đây là nội dung của file text trước khi ghi. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FtcuQ23U7FpUJwTTWJgQs%252Fimage.png%3Falt%3Dmedia%26token%3Da65d9da9-1b58-416d-af94-8e54bc161771&width=768&dpr=3&quality=100&sign=ecacf43a&sv=2) ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FlXW8wgOxYgA2i7CXBbt1%252Fimage.png%3Falt%3Dmedia%26token%3D1628afc2-b55c-4ee4-b4ed-3cbbabfd0a10&width=768&dpr=3&quality=100&sign=275f7ecd&sv=2) File append line Đây là nội dung của file text sau khi ghi. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F2nFdSSu7R0gtCOEIJRQV%252Fimage.png%3Falt%3Dmedia%26token%3De0210537-f57e-471a-bd82-860ce99a1e30&width=768&dpr=3&quality=100&sign=d1f857ed&sv=2) [PreviousFile write all textchevron-left](https://docs.gpmautomate.com/file-and-folder/file-write-all-text) [NextRead excel filechevron-right](https://docs.gpmautomate.com/file-and-folder/read-excel-file) Last updated 6 months ago --- # Image search | GPM Automate VI **Chú ý:** Hãy đảm bảo tỉ lệ scale của trang web lúc bạn screenshot ảnh phải giống với tỉ lệ scale lúc bạn chạy thực tế. Nếu không tính năng này sẽ không hoạt động. Sẽ trả về toạ độ ủa hình ảnh nếu tìm thấy, kết quả có dạng cặp toạ độ (x,y). Nếu không tìm thấy sẽ trả về -1,-1. VD: Bạn có thể kết hợp với action `Wait to image`,`If`, `Else if` và `Else, Image Search, Mouse click.` Mục đích: Chờ 1 hình ảnh xuất hiện trên trang web. Nếu nó tồn tại thì sẽ thực hiện các hành động tìm toạ độ hình ảnh và click vào ảnh đó trong khối `If`, nếu không thì thực hiện hành động trong khối `Else` hoặc bỏ qua, sang bước tiếp theo. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FpuPXfri1csSJ2bxv5l9E%252Fimage.png%3Falt%3Dmedia%26token%3D0a1fde56-94a4-42f3-9b18-d5fb5d3ed853&width=768&dpr=3&quality=100&sign=4c1a8a18&sv=2) action Image [hashtag](https://docs.gpmautomate.com/image-search/image-search#giai-thich-them-ve-cac-tham-so-trong-action-image) Giải thích thêm về các tham số trong action Image -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Threshold: Độ chính xác của hình ảnh. Giá trị nằm trong khoảng từ 0-1. Threshold càng cao thì yêu cầu độ chính xác của hình ảnh càng cao, nhưng thời gian tìm hình ảnh sẽ lâu hơn. Nếu không điền thì giá trị mặc định là 0.7 (độ chính xác tương đối). [PreviousImage existschevron-left](https://docs.gpmautomate.com/image-search/image-exists) [NextImage to Base64chevron-right](https://docs.gpmautomate.com/image-search/image-to-base64) Last updated 1 year ago --- # Image to Base64 | GPM Automate VI Cách điền như sau: ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F3o9sA5s0qa7xTicucwsS%252F6.JPG%3Falt%3Dmedia%26token%3D8e1c2e24-8046-4ffb-8d9d-92a63213b06b&width=768&dpr=3&quality=100&sign=a01d1bfe&sv=2) Image to Base64 Kết quả được lưu vào biến base64Code. [PreviousImage searchchevron-left](https://docs.gpmautomate.com/image-search/image-search) [NextVí dụ kết hợpchevron-right](https://docs.gpmautomate.com/image-search/vi-du-ket-hop) Last updated 7 months ago --- # Read mail code | GPM Automate VI **Chú ý:** Tài khoản mail cần phải bật trước giao thức IMAP. Riêng với Gmail, cần tạo mật khẩu ứng dụng Gmail. Hướng dẫn cách tạo: [https://www.youtube.com/watch?v=XqX0cXcp6DIarrow-up-right](https://www.youtube.com/watch?v=XqX0cXcp6DI) [hashtag](https://docs.gpmautomate.com/mail/read-mail-code#giai-thich-cac-thong-so-trong-action-read-mail-code) Giải thích các thông số trong action Read mail code ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 1. **Email:** Điền địa chỉ email cần đọc code 2. **Password:** Điền mật khẩu của email 3. **Mail server:** Máy chủ IMAP của mail. VD: Gmail: imap.gmail.com Outlook: outlook.office365.com 4. **Email sent to contains:** Địa chỉ email gửi đến có chứa cụm từ đó 5. **Code type:** gồm 2 loại là number (kiểu số) và text (kiểu chữ) Kiểu number: Code Length: Độ dài của otp cần đọc (ví dụ 475997 -> Code length là 6) Kiểu text: Code element xpath: Xpath của phần tử chứa mã OTP cần lấy Code element attribute: Điền text (nếu mã OTP cần lấy là text của 1 phần tử), hoặc điền tên thuộc tính nếu mã OTP cần lấy là giá trị của thuộc tính của phần tử đó. Ví dụ: Trong nội dung của email chứa code cần đọc, đoạn otp có xpath như sau: Nếu xpath là `

ABCDEF

` -> Tức là giá trị của mã OTP là text của phần tử có xpath là //h1 -> Điền Code element xpath là: //h1 và Code element attribute điền là: text Nếu xpath là `

` -> Tức là giá trị của mã OTP cần lấy là giá trị của thuộc tính @code trong phần tử có xpath //h1 -> Điền mục Code element xpath là: //h1 và Code element attribute điền là: code Tất nhiên ở đây chỉ là ví dụ. Trên thực tế xpath có thể không đơn giản là //h1, có thể phức tạp hơn. Bạn cần hiểu kỹ phần cơ bản về cách lấy xpath của 1 thành phần trên trang web. [PreviousMailchevron-left](https://docs.gpmautomate.com/mail) [NextRead outlook (Oauth2)chevron-right](https://docs.gpmautomate.com/mail/read-outlook-oauth2) Last updated 9 months ago --- # File read all lines | GPM Automate VI VD: Bạn có 1 file text `proxies_list.txt` như hình bên dưới, đường dẫn là `D:\proxies_list.txt` File text này gồm 5 dòng, mỗi dòng tương ứng với 1 proxy. Chú ý: Bạn có thể lấy được số dòng của file text bằng action Count như hướng dẫn ở đây: [https://docs.gpmautomate.com/no-code-automation/variables/countarrow-up-right](https://docs.gpmautomate.com/no-code-automation/variables/count) Bạn áp dụng điền cho action File read all lines như sau: ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FivOZ8vOAKcAr3IYpAQDd%252Fimage.png%3Falt%3Dmedia%26token%3D4c6f7863-b011-4ea6-ac34-8b2e9c9499b8&width=768&dpr=3&quality=100&sign=3c878c48&sv=2) File read all lines ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FNzzrL7PXr4oxDumytisJ%252Fimage.png%3Falt%3Dmedia%26token%3D753cecd1-5647-4b44-8601-2cdade5e7c9f&width=768&dpr=3&quality=100&sign=cf36a3ef&sv=2) File D:\\proxies\_list.txt ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FoYCGZYYHjI1catmtBxoy%252Fimage.png%3Falt%3Dmedia%26token%3D9ca8f2e6-8a6e-4155-9604-4b0fda722a93&width=768&dpr=3&quality=100&sign=c42e25ac&sv=2) Nội dung file proxies\_list.txt Khi đó kết quả trả về là 1 mảng $fileContent, với index bắt đầu từ 0, và các phần tử của nó lần lượt là: * $fileContent\[0\] = 182.74.243.35:8080:zkf82mx:pa9sLd3q * $fileContent\[1\] = 103.152.232.153:8080:nv38qkz:vK28szpL * $fileContent\[2\] = 185.199.228.171:7492:alx9wpe:Jd72kq1x * $fileContent\[3\] = 134.209.29.120:3128:rcm1vuo:Yp7dLq3n * $fileContent\[4\] = 47.243.180.142:8080:txe57nd:Wx9qTf6b Bạn có thể kết hợp với vòng lặp For để đọc nội dung file text như hướng dẫn trên. [PreviousFile read all textchevron-left](https://docs.gpmautomate.com/file-and-folder/file-read-all-text) [NextFile write all textchevron-right](https://docs.gpmautomate.com/file-and-folder/file-write-all-text) Last updated 6 months ago --- # Move / rename folder | GPM Automate VI [PreviousCreate folderchevron-left](https://docs.gpmautomate.com/file-and-folder/create-folder) [NextDelete folderchevron-right](https://docs.gpmautomate.com/file-and-folder/delete-folder) --- # Read excel file | GPM Automate VI **File Path:** đường dẫn file excel. **Sheet index:** Index của sheet cần đọc trong file excel (bắt đầu từ 0). **Column Name or Index:** Tên cột, bắt đầu từ A, B, C,.. hoặc index bắt đầu từ 1 (cột 1). **Row Index:** Bắt đầu từ 1 (hàng 1). [PreviousFile append linechevron-left](https://docs.gpmautomate.com/file-and-folder/file-append-line) [NextWrite excel filechevron-right](https://docs.gpmautomate.com/file-and-folder/write-excel-file) Last updated 1 year ago --- # Ví dụ kết hợp | GPM Automate VI ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FUdQqhB7CLz45onZnB1YA%252Fimage.png%3Falt%3Dmedia%26token%3D38bdf72e-eaab-4b2f-8c22-7e67bf6332b8&width=768&dpr=3&quality=100&sign=49b0aade&sv=2) Ví dụ Giả sử để click vào nút Claim màu xanh trong hình. ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F8O53FL4LzoKZc0IGwkWq%252Fimage.png%3Falt%3Dmedia%26token%3Dc6633fbb-a389-45a6-85c8-9caf8fad27e1&width=768&dpr=3&quality=100&sign=53bc7a6f&sv=2) Logic Image Search ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FgeSVDIjYx7bEyWlqGerr%252F1.JPG%3Falt%3Dmedia%26token%3D8f2e31b0-a8c6-4ebb-9f21-daf40d67dc31&width=768&dpr=3&quality=100&sign=77f1b721&sv=2) Wait to Image ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F5mLZtUhf4By1SdHX7w7t%252F2.JPG%3Falt%3Dmedia%26token%3Dda64ca9a-c3f3-47f6-817b-83ebc24de0b2&width=768&dpr=3&quality=100&sign=56e17689&sv=2) Image exists 1 ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FolH9SiPcXj7Zh1PrunXl%252F3.JPG%3Falt%3Dmedia%26token%3Dc60db9fc-836f-4540-9c71-3515a6520cb3&width=768&dpr=3&quality=100&sign=ad5a9147&sv=2) Image exists 2 ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252Fy8GA0Xl32drgGOannNgc%252F4.JPG%3Falt%3Dmedia%26token%3D0944fd59-8da9-4fdb-b059-534b213e6031&width=768&dpr=3&quality=100&sign=506918d1&sv=2) If ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FbD0OYeEt60e4xaFaatUK%252F5.JPG%3Falt%3Dmedia%26token%3Df6df90a8-8407-48c5-85cd-2d7977a33081&width=768&dpr=3&quality=100&sign=873b8557&sv=2) Image Search 1 ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F4JtW7xD9FQ9OM3Y517c0%252F6.JPG%3Falt%3Dmedia%26token%3D92f883be-40a0-485a-98b0-16f82492c8fd&width=768&dpr=3&quality=100&sign=da409b64&sv=2) Image Search 2 ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FigTFqEk3YsRMQZQiWA5F%252F7.JPG%3Falt%3Dmedia%26token%3D7c857914-2e09-4e73-bd00-eb7051fd7040&width=768&dpr=3&quality=100&sign=237a7a49&sv=2) Click toạ độ [PreviousImage to Base64chevron-left](https://docs.gpmautomate.com/image-search/image-to-base64) [NextAIchevron-right](https://docs.gpmautomate.com/ai) Last updated 9 months ago --- # Wait element | GPM Automate VI [PreviousElementchevron-left](https://docs.gpmautomate.com/element) [NextGet element attributechevron-right](https://docs.gpmautomate.com/element/get-element-attribute) --- # Read outlook (Oauth2) | GPM Automate VI **Chú ý:** Tài khoản mail cần phải bật trước giao thức IMAP. [hashtag](https://docs.gpmautomate.com/mail/read-outlook-oauth2#giai-thich-cac-thong-so-trong-action-read-mail-code) Giải thích các thông số trong action Read mail code ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1. **Email|Pass or Email|Refresh token|Client ID:** Điền thông tin email cần đọc code. Hiện nay khi mua mail outlook từ các trang bán mail, bạn thường được cung cấp 4 thông tin tài khoản dưới dạng: **Email|Pass|Refresh token|Client ID.** Bạn cần điền thông tin theo đúng định dạng như trên (Email|Pass hoặc Email|Refresh token|Client ID). 2. **Email sent to contains:** Địa chỉ email gửi đến có chứa cụm từ đó. Ví dụ: Bạn cần đọc code từ mail gửi tới có dạng [\[email protected\]](https://docs.gpmautomate.com/cdn-cgi/l/email-protection) , thì cần điền [\[email protected\]](https://docs.gpmautomate.com/cdn-cgi/l/email-protection) vào mục này. 3. **Code type:** gồm 2 loại là number (kiểu số) và text (kiểu chữ) Kiểu number: Code Length: Độ dài của otp cần đọc (ví dụ 475997 -> Code length là 6) Kiểu text: Code element xpath: Xpath của phần tử chứa mã OTP cần lấy Code element attribute: Điền text (nếu mã OTP cần lấy là text của 1 phần tử), hoặc điền tên thuộc tính nếu mã OTP cần lấy là giá trị của thuộc tính của phần tử đó. Ví dụ: Trong nội dung của email chứa code cần đọc, đoạn otp có xpath như sau: Nếu xpath là `

ABCDEF

` -> Tức là giá trị của mã OTP là text của phần tử có xpath là //h1 -> Điền Code element xpath là: //h1 và Code element attribute điền là: text Nếu xpath là `

` -> Tức là giá trị của mã OTP cần lấy là giá trị của thuộc tính @code trong phần tử có xpath //h1 -> Điền mục Code element xpath là: //h1 và Code element attribute điền là: code Tất nhiên ở đây chỉ là ví dụ. Trên thực tế xpath có thể không đơn giản là //h1, có thể phức tạp hơn. Bạn cần hiểu kỹ phần cơ bản về cách lấy xpath của 1 thành phần trên trang web. [PreviousRead mail codechevron-left](https://docs.gpmautomate.com/mail/read-mail-code) [NextNavigationchevron-right](https://docs.gpmautomate.com/navigation) Last updated 9 months ago --- # Get element text | GPM Automate VI [hashtag](https://docs.gpmautomate.com/element/get-element-text#giai-thich-them-ve-action-get-element-text) Giải thích thêm về action Get element text ----------------------------------------------------------------------------------------------------------------------------------------------------------- VD: Bạn có 1 xpath như sau: `

GHIJKL

` Để lấy giá trị `GHIJKL` bạn dùng action Get element text. [PreviousGet element attributechevron-left](https://docs.gpmautomate.com/element/get-element-attribute) [NextCount elementchevron-right](https://docs.gpmautomate.com/element/count-element) Last updated 1 year ago --- # Append excel file | GPM Automate VI **File Path:** đường dẫn file excel. **Sheet index:** Index của sheet cần đọc trong file excel (bắt đầu từ 0). **Column Name or Index:** Tên cột, bắt đầu từ A, B, C,.. hoặc index bắt đầu từ 1 (cột 1). **Row Index:** Bắt đầu từ 1 (hàng 1). **Ví dụ thực tế:** Giả sử bạn đang có file Excel có nội dung như hình dưới. Bạn muốn ghi tiếp nội dung vào cột B từ dòng thứ 5 trở đi (dòng trống). ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252F8BZAJ7cQAuuOWmrGK0Zg%252Fimage.png%3Falt%3Dmedia%26token%3D73c3a1c4-c63d-42e4-9418-e57377ee098b&width=768&dpr=3&quality=100&sign=c1c03d5a&sv=2) ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FxfKR6lYPTmLcy8JGVlVY%252Fimage.png%3Falt%3Dmedia%26token%3D1fb76e0e-1b66-4dd2-b094-ebcc424f0d50&width=768&dpr=3&quality=100&sign=b2bdc835&sv=2) Append excel file ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FRVr8QEkLV4umhXvaOnIf%252Fimage.png%3Falt%3Dmedia%26token%3Ded740711-4208-4319-b284-4115508fa316&width=768&dpr=3&quality=100&sign=8daded61&sv=2) Append excel file [PreviousWrite excel filechevron-left](https://docs.gpmautomate.com/file-and-folder/write-excel-file) [NextFolder existschevron-right](https://docs.gpmautomate.com/file-and-folder/folder-exists) Last updated 6 months ago --- # Get element attribute | GPM Automate VI [hashtag](https://docs.gpmautomate.com/element/get-element-attribute#giai-thich-them-ve-action-get-element-attribute) Giải thích thêm về action Get element attribute -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- VD: Bạn có 1 xpath như sau: `

GHIJKL

` Để lấy giá trị `ABCDEF` bạn dùng action Get element attribute (với attribute, tức thuộc tính, ở đây là code). [PreviousWait elementchevron-left](https://docs.gpmautomate.com/element/wait-element) [NextGet element textchevron-right](https://docs.gpmautomate.com/element/get-element-text) Last updated 1 year ago --- # Write excel file | GPM Automate VI **File Path:** đường dẫn file excel. **Sheet index:** Index của sheet cần đọc trong file excel (bắt đầu từ 0). **Column Name or Index:** Tên cột, bắt đầu từ A, B, C,.. hoặc index bắt đầu từ 1 (cột 1). **Row Index:** Bắt đầu từ 1 (hàng 1). **Ví dụ thực tế:** Giả sử bạn muốn ghi giá trị vào excel khớp theo đúng từng dòng tương ứng với profile đang chạy. Kết hợp biến **$inputExcelFileLocation** và **$inputExcelCurrentRow** ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FI9SONZHfF47FncM24ZhH%252Fid.JPG%3Falt%3Dmedia%26token%3D1a5dc639-0172-44b3-89c0-8c8914ba428d&width=768&dpr=3&quality=100&sign=546f023e&sv=2) Input Excel ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FZAGy7SWSkWzczMesmFBP%252Fimage.png%3Falt%3Dmedia%26token%3D09a04e65-eabd-4a61-8d13-5dd05f2a6835&width=768&dpr=3&quality=100&sign=8109766f&sv=2) For ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FdqwESCAvo6bAACjdYciC%252Fimage.png%3Falt%3Dmedia%26token%3Daa4d0735-ddbc-42f1-a3f2-194a651e7d62&width=768&dpr=3&quality=100&sign=d8f477b4&sv=2) Write Excel [PreviousRead excel filechevron-left](https://docs.gpmautomate.com/file-and-folder/read-excel-file) [NextAppend excel filechevron-right](https://docs.gpmautomate.com/file-and-folder/append-excel-file) Last updated 9 months ago --- # Delete folder | GPM Automate VI [PreviousMove / rename folderchevron-left](https://docs.gpmautomate.com/file-and-folder/move-rename-folder) [NextFolder get file listchevron-right](https://docs.gpmautomate.com/file-and-folder/folder-get-file-list) --- # Folder get file list | GPM Automate VI VD: Bạn có 1 thư mục như hình bên dưới, đường dẫn là D:\\test case. Thư mục này gồm 5 file. Chú ý: Bạn có thể lấy được số file trong thư mục bằng action Count như hướng dẫn ở đây: [https://docs.gpmautomate.com/no-code-automation/variables/countarrow-up-right](https://docs.gpmautomate.com/no-code-automation/variables/count) Bạn áp dụng điền cho action Folder get file list như sau: ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FOCMC5zTqX2XM7zqA08NG%252Fimage.png%3Falt%3Dmedia%26token%3Da002f858-1b0b-4434-8965-6fa2ecf85c0f&width=768&dpr=3&quality=100&sign=d67069c8&sv=2) Folder get file list ![](https://docs.gpmautomate.com/~gitbook/image?url=https%3A%2F%2F641695406-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fwj2rOIUuOrQMX9pytS6j%252Fuploads%252FqYUCSIYAqAxZCB9dPUgP%252Fimage.png%3Falt%3Dmedia%26token%3Dc938c6e2-6472-4634-87f7-a6a54c959839&width=768&dpr=3&quality=100&sign=b5af3350&sv=2) Thư mục D:\\test case Khi đó kết quả trả về là 1 mảng $fileList, với index bắt đầu từ 0, và các phần tử của nó lần lượt là: * $fileList\[0\] = D:\\test case\\1234.txt * $fileList\[1\] = D:\\test case\\danhsach.xlsx * $fileList\[2\] = D:\\test case\\document.docx * $fileList\[3\] = D:\\test case\\test wait image.gpmcode * $fileList\[4\] = D:\\test case\\test wallet.txt Bạn có thể áp dụng thêm với vòng lặp For để lấy danh sách đường dẫn file như hướng dẫn trên. [PreviousDelete folderchevron-left](https://docs.gpmautomate.com/file-and-folder/delete-folder) [NextClipboardchevron-right](https://docs.gpmautomate.com/clipboard) Last updated 6 months ago --- # Count element | GPM Automate VI [PreviousGet element textchevron-left](https://docs.gpmautomate.com/element/get-element-text) [NextMousechevron-right](https://docs.gpmautomate.com/mouse) --- # Go to URL | GPM Automate VI **Timeout:** thời gian hết hạn khi truy cập 1 trang web. Mặc định là 60s. Ví dụ: Bạn sử dụng proxy khi truy cập trang web. Tuy nhiên tốc độ của nó rất chậm, thời gian phản hồi lâu, hoặc do máy chủ của trang web đó chậm. Bạn muốn tăng thời gian chờ phản hồi thì có thể sửa thông số timeout này. Còn không mặc định sẽ là 60s sẽ hết hạn. [PreviousClose tabchevron-left](https://docs.gpmautomate.com/navigation/close-tab) [NextBack URLchevron-right](https://docs.gpmautomate.com/navigation/back-url) Last updated 9 months ago --- # New tab | GPM Automate VI [PreviousNavigationchevron-left](https://docs.gpmautomate.com/navigation) [NextActive tabchevron-right](https://docs.gpmautomate.com/navigation/active-tab) --- # Close tab | GPM Automate VI [PreviousActive tabchevron-left](https://docs.gpmautomate.com/navigation/active-tab) [NextGo to URLchevron-right](https://docs.gpmautomate.com/navigation/go-to-url) --- # Active tab | GPM Automate VI [PreviousNew tabchevron-left](https://docs.gpmautomate.com/navigation/new-tab) [NextClose tabchevron-right](https://docs.gpmautomate.com/navigation/close-tab) --- # Wait URL Changed | GPM Automate VI [PreviousGet URLchevron-left](https://docs.gpmautomate.com/navigation/get-url) [NextElementchevron-right](https://docs.gpmautomate.com/element) --- # Back URL | GPM Automate VI [PreviousGo to URLchevron-left](https://docs.gpmautomate.com/navigation/go-to-url) [NextReloadchevron-right](https://docs.gpmautomate.com/navigation/reload) --- # Reload | GPM Automate VI [PreviousBack URLchevron-left](https://docs.gpmautomate.com/navigation/back-url) [NextGet URLchevron-right](https://docs.gpmautomate.com/navigation/get-url) --- # Mouse click | GPM Automate VI Có thể lựa chọn click chuột vào phần tử dựa theo 1 trong 3 kiểu sau: 1. Click dựa theo xpath. 2. Click dựa theo toạ độ. 3. Click dựa theo vị trí hiện tại của con trỏ chuột. Giải thích thêm về click dựa theo toạ độ Bạn có thể dùng extension sau để lấy loạ độ của 1 điểm trên trang web. **Mouse Coordinates:** [https://chromewebstore.google.com/detail/mouse-coordinates/mfohnjojhopfcahiddmeljeholnciaklarrow-up-right](https://chromewebstore.google.com/detail/mouse-coordinates/mfohnjojhopfcahiddmeljeholnciakl) **Chú ý:** Hãy đảm bảo tỉ lệ scale của trang web lúc bạn lấy toạ độ phải giống với tỉ lệ scale lúc bạn chạy thực tế. Nếu không tính năng này sẽ không hoạt động. [PreviousMousechevron-left](https://docs.gpmautomate.com/mouse) [NextMouse try to clickchevron-right](https://docs.gpmautomate.com/mouse/mouse-try-to-click) Last updated 1 year ago --- # Get URL | GPM Automate VI [PreviousReloadchevron-left](https://docs.gpmautomate.com/navigation/reload) [NextWait URL Changedchevron-right](https://docs.gpmautomate.com/navigation/wait-url-changed) --- # Select dropdown | GPM Automate VI **Chú ý:** Action này chỉ có tác dụng đối với thẻ `