# Browser automation

> How do I run browser automation tasks like web scraping with Chromium in Windmill?

Windmill makes it easy to perform browser automation tasks, such as testing or web scraping.

:::info
Not sure what a worker group is? You should probably [read about it first](../../core_concepts/9_worker_groups/index.mdx).
:::

By default, a worker group named `reports` is available which will handle jobs with the `chromium` tag.
Workers assigned to this group will install chromium on start (learn more about [init scripts](../../core_concepts/9_worker_groups/index.mdx#init-scripts)).
You have to set the worker group of at least one worker to `reports`.
There is a sample worker container definition called `windmill_worker_reports` in the `docker-compose.yml` file which you can uncomment to quickly start a worker with the right worker group.

The chromium binary will be available on these workers at `/usr/bin/chromium`.
You will need to disable the sandbox to run it inside windmill workers.
You can do this by passing the `--no-sandbox` flag.

:::caution
Running chromium without the sandbox is a security risk. Make sure you trust the website you are visiting.
:::

To run jobs on a chromium-equipped worker, you have to select the `chromium` tag in the settings of the script or flow step.
[Learn how here](../../core_concepts/9_worker_groups/index.mdx).

## Examples

### Playwright (Bun)

```typescript

  const page = await browser.newPage();
  await page.goto("https://google.com");

  const title = await page.title();

  await browser.close()

  return title
}
```

### Puppeteer (Bun)

```typescript

  const page = await browser.newPage();
  await page.goto("https://google.com");

  const title = await page.title();

  await browser.close();

  return title;
}
```
