# Eval

Node eval để chạy code javascript trong ngữ cảnh trình duyệt và có thể trả kết quả lưu vào variable. Các bạn có thể tham khảo [<mark style="color:blue;">**tại đây**</mark>](https://www.w3schools.com/js/).

<figure><img src="/files/nlAIFqkqfZjUjsHqEKah" alt=""><figcaption></figcaption></figure>

| parameter        | illustrate                                                     |
| ---------------- | -------------------------------------------------------------- |
| JavaScript       | Nhập code javascript                                           |
| Inject variavles | Chọn biến được chèn, biến này có thể được sử dụng trong hàm js |
| Output variable  | Lưu giá trị được hàm tập lệnh Javascript trả về vào một biến.  |

Ta có ví dụ như sau: Khi bạn truy cập một trang web nào đó, bạn muốn thực hiện click vào một phần tử, thay vì sử dụng node click bạn cũng có thể sử dụng node Eval để thực hiện hành động click đó. Ta có script đơn giản như sau:

<figure><img src="/files/o7xZcMOGdKfihJjxNxHz" alt=""><figcaption></figcaption></figure>

Tại node Eval bạn nhập như sau để có thể click vào phần tử bạn mong muốn:

<figure><img src="/files/B3QzNAIDFsLvYv3QiMhN" alt=""><figcaption></figcaption></figure>

Bằng cách này bạn cũng có thể click vào phần tử mong muốn mà không cần sử dụng node click.

{% file src="/files/lm6HdliLB985jsshyIlD" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hidemium.io/automation-user-manual/other/eval.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
