# Browser Alert

The **Browser Alert** building block is for handling native browser dialogs like prompts, confirms, alerts, and beforeunload (page exit) confirmations. Per default, TaskBot dismisses these dialogs automatically by clicking **Cancel**. Use this block if TaskBot needs to **accept** the alert.

#### **Prompt text (optional)**

If the browser dialog is a **prompt** requiring input, enter the response text as shown in the screenshot below. This field is ignored for browser dialogs of type alert, confirm or beforeunload (page exit).

<figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2FFpePa16EZyyHAy4QppFy%2FScreenshot%202024-11-10%20at%2007.23.42.png?alt=media&#x26;token=ec64a848-eca5-48f5-8626-9b88515956bf" alt=""><figcaption></figcaption></figure>

#### **Placement**

Simply place the **Browser Alert** building block after the action that triggers the dialog.

<figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2FYiXMhNDh1qnYZEnLRDk7%2FScreenshot%202024-11-10%20at%2007.28.12.png?alt=media&#x26;token=e2d87a65-9a81-488a-90bf-5b4eb960fdb1" alt=""><figcaption></figcaption></figure>

#### **Run behavior**:

* If a browser alert appears, TaskBot will accept it and continue.
* If no alert is present, TaskBot takes no action and proceeds without interruption.
