> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-web/en/faq/faq-create-scenario/faq-js-step/frequently-asked-questions-about-js-step.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Frequently Asked Questions about JS Steps

### I can't select the element that I want to perform an action on. What should I do?

In some cases, you can't use the selector you got from Developer Tools as is, for example, if an element contains dynamic data. If you want to perform an action on a particular element but are having trouble selecting it in a JS Step, please refer to the following articles:

* [How to fix CSS selector errors](https://help.autify.com/nocode-web/en/when-the-test-doesnt-work/tips/how-to-fix-css-selector-errors.md)
* [How to grab an element with dynamic data](https://help.autify.com/nocode-web/en/when-the-test-doesnt-work/test-issues/how-to-grab-an-element-with-dynamic-data.md)

### What is the timeout period of a JS Step?

The timeout period of a JS Step is 120 seconds. If you need to execute a process that takes longer than 120 seconds, please split the step into multiple steps or insert a sleep step.

### Are there any differences between recorded actions and JS Step actions?

Yes, there are some differences between recorded actions and JS Step actions. The difference is due to how actions are performed.

Take a click, for example. When recording, a click action is actually performed. On the other hand, in a JS Step, the element is clicked using the HTMLElement.click() method.

Because some events are not dispatched in HTMLElement.click(), events caused by the click may not be triggered. As a result, the behavior may be different than when the element is actually clicked.

If you create a JS Step but it doesn't perform the intended behavior, it may mean that events that are set up separately need to be fired. Please contact our support team.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-web/en/faq/faq-create-scenario/faq-js-step/frequently-asked-questions-about-js-step.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
