# Bricks for Interacting with the DOM

Many automations involve interacting with elements on the page, such as filling out a form or clicking on a field. You'll use these common bricks to interact with elements on a page.

### Set Input Value

Now that we've collected data in a few different ways (scraping the page to get text in a box and transforming a URL into a shortened link) let's do something with it. In many cases, you're going to want to turn that text into data you can add to a page, such as setting content for a tweet or LinkedIn message, filling out a form in Salesforce, or performing a search query on a site.

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

To do this, you'll use the **Set Input Value** brick. You can learn more in the [Set Input Value brick docs](https://www.pixiebrix.com/marketplace/51c95696-f0ad-4cc8-acab-e9b351e4e9ca/?utm_source=pixiebrix\&utm_medium=page_editor\&utm_campaign=docs\&utm_content=view_docs_link).

### Simulate DOM event

Here’s another action you’ll find useful as you build your PixieBrix mods! If you're not a developer, the words "DOM" might not mean anything to you, but in plain English, the **Simulate DOM Event** brick allows PixieBrix to interact with items on a page and trigger actions, like clicking elements on a page.

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

It can be useful for submitting forms or posting content, like tweets or LinkedIn posts, but it’s also a great way to navigate between pages that don’t have clear links between them.

Learn more in the [Simulate DOM Event docs](https://www.pixiebrix.com/marketplace/ceca912f-bb40-4686-a8e6-e5508620018c/).


---

# 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.pixiebrix.com/developing-mods/developer-concepts/using-bricks/bricks-for-interacting-with-the-dom.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.
