Skip to main content

Python pre-commit Code style: black

The MiniWoB++ (Mini World of Bits++) library contains a collection of over 100 web interaction environments, along with JavaScript and Python interfaces for programmatically interacting with them. The Python interface follows the Gymnasium API and uses Selenium WebDriver to perform actions on the web browser.

MiniWoB++ is an extension of the OpenAI MiniWoB benchmark, and was introduced in the paper Reinforcement Learning on Web Interfaces using Workflow-Guided Exploration.

The documentation website is at miniwob.farama.org. Development on MiniWoB++ is currently ongoing to bring it up to Farama Standards for mature projects, and will be maintained long term after this point. See the Project Roadmap for more details. If you'd like to help out, you can join our discord server here: https://discord.gg/PfR7a79FpQ.

Installation

MiniWoB++ supports Python 3.10+ on Linux and macOS.

Installing the MiniWoB++ Library

To install the MiniWoB++ library, use pip install miniwob.

Installing Chrome/Chromium and ChromeDriver

We strongly recommend using Chrome or Chromium as the web browser, as other browsers may render the environments differently.

The MiniWoB++ Python interface uses Selenium, which interacts with the browser via the WebDriver API. Follow one of the instruction methods to install ChromeDriver. The simplest method is to download ChromeDriver with the matching version, unzip it, and then add the directory containing the chromedriver executable to the PATH environment variable:

export PATH=$PATH:/path/to/chromedriver

For Chromium, the driver may also be available in a software package; for example, in Debian/Ubuntu:

sudo apt install chromium-driver

The browser and ChromeDriver versions must match. If more than one Chrome or ChromeDriver installation is available, set MINIWOB_CHROME_BINARY and MINIWOB_CHROMEDRIVER together to the matching executables before starting MiniWoB++:

export MINIWOB_CHROME_BINARY=/path/to/chrome
export MINIWOB_CHROMEDRIVER=/path/to/chromedriver

Both variables must be set together. If neither variable is set, Selenium uses its normal browser and driver discovery behavior.

Example Usage

The following code performs a deterministic action on the click-test-2 environment.

import time
import gymnasium
import miniwob
from miniwob.action import ActionTypes

gymnasium.register_envs(miniwob)

env = gymnasium.make('miniwob/click-test-2-v1', render_mode='human')

# Wrap the code in try-finally to ensure proper cleanup.
try:
  # Start a new episode.
  obs, info = env.reset()
  assert obs["utterance"] == "Click button ONE."
  assert obs["fields"] == (("target", "ONE"),)
  time.sleep(2)       # Only here to let you look at the environment.
  
  # Find the HTML element with text "ONE".
  for element in obs["dom_elements"]:
    if element["text"] == "ONE":
      break

  # Click on the element.
  action = env.unwrapped.create_action(ActionTypes.CLICK_ELEMENT, ref=element["ref"])
  obs, reward, terminated, truncated, info = env.step(action)

  # Check if the action was correct. 
  print(reward)      # Should be around 0.8 since 2 seconds has passed.
  assert terminated is True
  time.sleep(2)

finally:
  env.close()

See the documentation for more information.

Environments

The list of the environments that were included in the MiniWoB++ library can be found in the documentation. All environments share the same observation space, while the action space can be configured during environment construction.

Citation

To cite this project please use:

@inproceedings{liu2018reinforcement,
 author = {Evan Zheran Liu and Kelvin Guu and Panupong Pasupat and Tianlin Shi and Percy Liang},
 title = {Reinforcement Learning on Web Interfaces using Workflow-Guided Exploration},
 booktitle = {International Conference on Learning Representations ({ICLR})},
 url = {https://arxiv.org/abs/1802.08802},
 year = {2018},
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miniwob-1.1.0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miniwob-1.1.0-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file miniwob-1.1.0.tar.gz.

File metadata

  • Download URL: miniwob-1.1.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for miniwob-1.1.0.tar.gz
Algorithm Hash digest
SHA256 37aefd67bcae51ecaf4bd3ba84e33eb904012a3459a7c342b338f81eae187048
MD5 3a0bb93499b3371776de4ff35bf0e117
BLAKE2b-256 866d6083b1bd580c1a5468a7cd086a48996db715b41e898823d53845c7b4003a

See more details on using hashes here.

Provenance

The following attestation bundles were made for miniwob-1.1.0.tar.gz:

Publisher: build-publish.yml on Farama-Foundation/MiniWoB-plusplus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file miniwob-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: miniwob-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for miniwob-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 297006e84219d56ad037e843527ed773a4a82509dc43b6031ec4a3ad3e3e61d9
MD5 dae0e01c8ff274f8dedeb607f89f89b2
BLAKE2b-256 fca1a34e0cc33dcba9de00001695979d2b9e3cc2de03bacdf010f045fb084afe

See more details on using hashes here.

Provenance

The following attestation bundles were made for miniwob-1.1.0-py3-none-any.whl:

Publisher: build-publish.yml on Farama-Foundation/MiniWoB-plusplus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page