├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug.md │ ├── proposal.md │ └── question.md ├── PULL_REQUEST_TEMPLATE.md ├── stale.yml └── workflows │ ├── build-docs.yml │ ├── build-publish.yaml │ ├── build.yml │ └── pre-commit.yml ├── .gitignore ├── .pre-commit-config.yaml ├── CODE_OF_CONDUCT.rst ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docs ├── .gitignore ├── 404.md ├── README.md ├── _scripts │ ├── gen_env_list.py │ ├── gen_mds.py │ ├── move_404.py │ └── utils.py ├── _static │ ├── img │ │ ├── custom-environment-1.png │ │ ├── example-usage-1.png │ │ ├── example-usage-2.png │ │ ├── favicon.png │ │ ├── miniwobplusplus-github.png │ │ ├── miniwobplusplus-text.png │ │ ├── miniwobplusplus-text.svg │ │ ├── miniwobplusplus-white.svg │ │ ├── miniwobplusplus.svg │ │ ├── showcase-static.png │ │ └── showcase.gif │ └── videos │ │ └── miniwob.mp4 ├── conf.py ├── content │ ├── action_space.md │ ├── basic_usage.md │ ├── custom_environment.md │ ├── demonstrations.md │ ├── getting_started.md │ ├── javascript_api.md │ ├── observation_space.md │ ├── reward.md │ └── viewing.md ├── environments │ └── .gitkeep ├── index.md └── requirements.txt ├── miniwob ├── __init__.py ├── action.py ├── constants.py ├── dom.py ├── environment.py ├── envs │ ├── __init__.py │ ├── flightwob_envs.py │ └── miniwob_envs.py ├── fields.py ├── html │ ├── .gitignore │ ├── common │ │ ├── shapes.js │ │ ├── special │ │ │ ├── book-flight │ │ │ │ └── domestic.js │ │ │ ├── checkbox-numbers │ │ │ │ ├── ch_0.png │ │ │ │ ├── ch_1.png │ │ │ │ ├── ch_2.png │ │ │ │ ├── ch_3.png │ │ │ │ ├── ch_4.png │ │ │ │ ├── ch_5.png │ │ │ │ ├── ch_6.png │ │ │ │ ├── ch_7.png │ │ │ │ ├── ch_8.png │ │ │ │ └── ch_9.png │ │ │ ├── click-pie │ │ │ │ ├── raphael.icons.min.js │ │ │ │ ├── raphael.min.js │ │ │ │ └── wheelnav.min.js │ │ │ ├── drag-cube │ │ │ │ ├── blank.png │ │ │ │ ├── cube.css │ │ │ │ └── cube.js │ │ │ ├── dropdown │ │ │ │ ├── jquery.selectric.js │ │ │ │ └── selectric.css │ │ │ ├── email-inbox-nl │ │ │ │ └── templates.js │ │ │ ├── email-inbox │ │ │ │ ├── delete.png │ │ │ │ ├── email-inbox.css │ │ │ │ ├── forward.png │ │ │ │ ├── left-arrow-white.png │ │ │ │ ├── left-arrow.png │ │ │ │ ├── reply.png │ │ │ │ ├── search.png │ │ │ │ ├── send.png │ │ │ │ ├── star-clicked.png │ │ │ │ └── star.png │ │ │ ├── navigate-tree │ │ │ │ ├── images │ │ │ │ │ ├── ajax-loader.gif │ │ │ │ │ ├── file.gif │ │ │ │ │ ├── folder-closed.gif │ │ │ │ │ ├── folder.gif │ │ │ │ │ ├── minus.gif │ │ │ │ │ ├── plus.gif │ │ │ │ │ ├── treeview-black-line.gif │ │ │ │ │ ├── treeview-black.gif │ │ │ │ │ ├── treeview-default-line.gif │ │ │ │ │ ├── treeview-default.gif │ │ │ │ │ ├── treeview-famfamfam-line.gif │ │ │ │ │ ├── treeview-famfamfam.gif │ │ │ │ │ ├── treeview-gray-line.gif │ │ │ │ │ ├── treeview-gray.gif │ │ │ │ │ ├── treeview-red-line.gif │ │ │ │ │ └── treeview-red.gif │ │ │ │ ├── jquery.treeview.css │ │ │ │ └── jquery.treeview.min.js │ │ │ ├── order-food │ │ │ │ ├── dairy.png │ │ │ │ ├── gluten-free.png │ │ │ │ ├── meat.png │ │ │ │ ├── peanuts.png │ │ │ │ └── vegan.png │ │ │ ├── search-engine │ │ │ │ └── jquery.twbsPagination.min.js │ │ │ ├── social-media │ │ │ │ ├── like-hover.png │ │ │ │ ├── like.png │ │ │ │ ├── more-hover.png │ │ │ │ ├── more.png │ │ │ │ ├── reply-hover.png │ │ │ │ ├── reply.png │ │ │ │ ├── retweet-hover.png │ │ │ │ ├── retweet.png │ │ │ │ ├── share-hover.png │ │ │ │ └── share.png │ │ │ ├── text-editor │ │ │ │ ├── quill.min.js │ │ │ │ └── quill.snow.css │ │ │ └── tic-tac-toe │ │ │ │ ├── o.png │ │ │ │ └── x.png │ │ └── ui_utils.js │ ├── core │ │ ├── core.css │ │ ├── core.js │ │ ├── d3.v3.min.js │ │ ├── d3.v4.min.js │ │ ├── jquery-ui-hacks.js │ │ ├── jquery-ui │ │ │ ├── external │ │ │ │ └── jquery │ │ │ │ │ └── jquery.js │ │ │ ├── images │ │ │ │ ├── ui-icons_444444_256x240.png │ │ │ │ ├── ui-icons_555555_256x240.png │ │ │ │ ├── ui-icons_777620_256x240.png │ │ │ │ ├── ui-icons_777777_256x240.png │ │ │ │ ├── ui-icons_cc0000_256x240.png │ │ │ │ └── ui-icons_ffffff_256x240.png │ │ │ ├── jquery-ui.min.css │ │ │ ├── jquery-ui.min.js │ │ │ ├── jquery-ui.structure.min.css │ │ │ └── jquery-ui.theme.min.css │ │ ├── jscolor.min.js │ │ └── record.js │ ├── flight │ │ ├── AA │ │ │ ├── apps │ │ │ │ └── common │ │ │ │ │ └── js │ │ │ │ │ ├── aacom.js │ │ │ │ │ ├── aacomDevice.js │ │ │ │ │ ├── airportcode.js │ │ │ │ │ ├── cookieconsent.js │ │ │ │ │ ├── jquery │ │ │ │ │ └── aacom │ │ │ │ │ │ ├── plugins │ │ │ │ │ │ ├── aaAirportAutoComplete.js │ │ │ │ │ │ ├── aaCache.js │ │ │ │ │ │ ├── aaCookie.js │ │ │ │ │ │ ├── aaCountryLanSelect.js │ │ │ │ │ │ ├── aaDropdownPanel.js │ │ │ │ │ │ ├── aaFooterAds.js │ │ │ │ │ │ └── aaTextBoxMessage.js │ │ │ │ │ │ └── utilities │ │ │ │ │ │ ├── aaUtilities-2.1.js │ │ │ │ │ │ └── aaUtils.js │ │ │ │ │ └── wa.js │ │ │ ├── content │ │ │ │ ├── common │ │ │ │ │ └── css │ │ │ │ │ │ └── v3 │ │ │ │ │ │ ├── core.css │ │ │ │ │ │ ├── jquery-ui-1.10-aa.css │ │ │ │ │ │ ├── reservation │ │ │ │ │ │ └── findFlights │ │ │ │ │ │ │ └── mobile │ │ │ │ │ │ │ └── findFlights.css │ │ │ │ │ │ └── responsive.css │ │ │ │ ├── fonts │ │ │ │ │ ├── american-v2 │ │ │ │ │ │ ├── americansans-bold.woff │ │ │ │ │ │ ├── americansans-light.woff │ │ │ │ │ │ ├── americansans-medium.woff │ │ │ │ │ │ └── americansans-regular.woff │ │ │ │ │ └── icons │ │ │ │ │ │ └── american-icons-v4-4.woff │ │ │ │ └── images │ │ │ │ │ ├── chrome │ │ │ │ │ ├── icons │ │ │ │ │ │ └── loading.gif │ │ │ │ │ └── rebrand │ │ │ │ │ │ ├── aa-flight-icon.png │ │ │ │ │ │ ├── aa-icons-flags-sprite.png │ │ │ │ │ │ ├── aa-logo.png │ │ │ │ │ │ ├── down-arrow.png │ │ │ │ │ │ ├── favicon.png │ │ │ │ │ │ ├── oneworld.png │ │ │ │ │ │ ├── shadow-down.png │ │ │ │ │ │ ├── shadow-vertical-150.png │ │ │ │ │ │ ├── shadow12-down.png │ │ │ │ │ │ ├── shadow12-up.png │ │ │ │ │ │ └── shadow3-down.png │ │ │ │ │ └── graphics │ │ │ │ │ └── icons │ │ │ │ │ └── aa-jqueryUIicons-sprite.png │ │ │ ├── dataset-AA.js │ │ │ ├── index.html │ │ │ ├── js │ │ │ │ ├── aa │ │ │ │ │ ├── common │ │ │ │ │ │ ├── aa-utility-menu.js │ │ │ │ │ │ ├── aacom-ui-1.0.0.js │ │ │ │ │ │ └── core-2.0.0.js │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── airportLookup.js │ │ │ │ │ │ ├── ajax.js │ │ │ │ │ │ ├── browserdetect.js │ │ │ │ │ │ ├── commonsetup.js │ │ │ │ │ │ ├── mobileDatePicker.js │ │ │ │ │ │ ├── utilities.js │ │ │ │ │ │ └── widgets.js │ │ │ │ │ ├── plugins │ │ │ │ │ │ └── noBounce.js │ │ │ │ │ └── shopping │ │ │ │ │ │ └── mobileSearchFlights.js │ │ │ │ └── libs │ │ │ │ │ ├── jquery │ │ │ │ │ ├── jquery-1.11.1.min.js │ │ │ │ │ ├── jquery-migrate-1.2.1.min.js │ │ │ │ │ └── ui │ │ │ │ │ │ └── 1.10 │ │ │ │ │ │ ├── i18n │ │ │ │ │ │ └── jquery.ui.datepicker-en-aa.js │ │ │ │ │ │ └── jquery-ui.min.js │ │ │ │ │ └── modernizr-2.8.1.js │ │ │ ├── original.html │ │ │ ├── surrogate │ │ │ │ ├── airportLookup.js │ │ │ │ └── airports.json │ │ │ └── wrapper.html │ │ ├── Alaska-auto-medium │ │ │ ├── images │ │ │ │ ├── aura.png │ │ │ │ ├── cal3.png │ │ │ │ ├── chkboxes3.png │ │ │ │ ├── clear_text2.png │ │ │ │ ├── collapse.png │ │ │ │ ├── expand.png │ │ │ │ ├── flight_arrow.png │ │ │ │ ├── geo.png │ │ │ │ ├── home.png │ │ │ │ ├── info2.png │ │ │ │ ├── leftright.png │ │ │ │ ├── logo2.png │ │ │ │ └── logos │ │ │ │ │ ├── AA.png │ │ │ │ │ ├── AS.png │ │ │ │ │ ├── DL.png │ │ │ │ │ └── VX.png │ │ │ ├── index.html │ │ │ ├── mobileweb-v3-28-6227-21813.css │ │ │ ├── scripts │ │ │ │ ├── datepickr.js │ │ │ │ ├── main.js │ │ │ │ └── shopbook.js │ │ │ ├── stylesheets │ │ │ │ └── circular │ │ │ │ │ ├── ASCircularWeb-Bold.woff │ │ │ │ │ └── ASCircularWeb-Book.woff │ │ │ ├── surrogate │ │ │ │ ├── airportLookup.js │ │ │ │ └── airports.json │ │ │ └── wrapper.html │ │ ├── Alaska-auto │ │ │ ├── images │ │ │ │ ├── aura.png │ │ │ │ ├── cal3.png │ │ │ │ ├── chkboxes3.png │ │ │ │ ├── clear_text2.png │ │ │ │ ├── collapse.png │ │ │ │ ├── expand.png │ │ │ │ ├── flight_arrow.png │ │ │ │ ├── geo.png │ │ │ │ ├── home.png │ │ │ │ ├── info2.png │ │ │ │ ├── leftright.png │ │ │ │ ├── logo2.png │ │ │ │ └── logos │ │ │ │ │ ├── AA.png │ │ │ │ │ ├── AS.png │ │ │ │ │ ├── DL.png │ │ │ │ │ └── VX.png │ │ │ ├── index.html │ │ │ ├── mobileweb-v3-28-6227-21813.css │ │ │ ├── scripts │ │ │ │ ├── datepickr.js │ │ │ │ ├── main.js │ │ │ │ └── shopbook.js │ │ │ ├── stylesheets │ │ │ │ └── circular │ │ │ │ │ ├── ASCircularWeb-Bold.woff │ │ │ │ │ └── ASCircularWeb-Book.woff │ │ │ ├── surrogate │ │ │ │ ├── airportLookup.js │ │ │ │ └── airports.json │ │ │ └── wrapper.html │ │ ├── Alaska │ │ │ ├── dataset-Alaska.js │ │ │ ├── images │ │ │ │ ├── aura.png │ │ │ │ ├── cal3.png │ │ │ │ ├── chkboxes3.png │ │ │ │ ├── clear_text2.png │ │ │ │ ├── collapse.png │ │ │ │ ├── expand.png │ │ │ │ ├── flight_arrow.png │ │ │ │ ├── geo.png │ │ │ │ ├── home.png │ │ │ │ ├── info2.png │ │ │ │ ├── leftright.png │ │ │ │ ├── logo2.png │ │ │ │ └── logos │ │ │ │ │ ├── AA.png │ │ │ │ │ ├── AS.png │ │ │ │ │ ├── DL.png │ │ │ │ │ └── VX.png │ │ │ ├── index.html │ │ │ ├── mobileweb-v3-28-6227-21813.css │ │ │ ├── original.html │ │ │ ├── scripts │ │ │ │ ├── datepickr.js │ │ │ │ ├── main.js │ │ │ │ └── shopbook.js │ │ │ ├── stylesheets │ │ │ │ └── circular │ │ │ │ │ ├── ASCircularWeb-Bold.woff │ │ │ │ │ └── ASCircularWeb-Book.woff │ │ │ ├── surrogate │ │ │ │ ├── airportLookup.js │ │ │ │ └── airports.json │ │ │ └── wrapper.html │ │ └── flight-common │ │ │ ├── inject.js │ │ │ ├── wrapper.css │ │ │ └── wrapper.js │ └── miniwob │ │ ├── ascending-numbers.html │ │ ├── bisect-angle.html │ │ ├── book-flight-nodelay.html │ │ ├── book-flight.html │ │ ├── button-delay.html │ │ ├── buy-ticket.html │ │ ├── chase-circle.html │ │ ├── choose-date-easy.html │ │ ├── choose-date-medium.html │ │ ├── choose-date-nodelay.html │ │ ├── choose-date.html │ │ ├── choose-list.html │ │ ├── circle-center.html │ │ ├── click-button-sequence.html │ │ ├── click-button.html │ │ ├── click-checkboxes-large.html │ │ ├── click-checkboxes-soft.html │ │ ├── click-checkboxes-transfer.html │ │ ├── click-checkboxes.html │ │ ├── click-collapsible-2-nodelay.html │ │ ├── click-collapsible-2.html │ │ ├── click-collapsible-nodelay.html │ │ ├── click-collapsible.html │ │ ├── click-color.html │ │ ├── click-dialog-2.html │ │ ├── click-dialog.html │ │ ├── click-link.html │ │ ├── click-menu-2.html │ │ ├── click-menu.html │ │ ├── click-option.html │ │ ├── click-pie-nodelay.html │ │ ├── click-pie.html │ │ ├── click-scroll-list.html │ │ ├── click-shades.html │ │ ├── click-shape.html │ │ ├── click-tab-2-easy.html │ │ ├── click-tab-2-hard.html │ │ ├── click-tab-2-medium.html │ │ ├── click-tab-2.html │ │ ├── click-tab.html │ │ ├── click-test-2.html │ │ ├── click-test-transfer.html │ │ ├── click-test.html │ │ ├── click-widget.html │ │ ├── copy-paste-2.html │ │ ├── copy-paste.html │ │ ├── count-shape.html │ │ ├── count-sides.html │ │ ├── daily-calendar.html │ │ ├── drag-box.html │ │ ├── drag-circle.html │ │ ├── drag-cube.html │ │ ├── drag-items-grid.html │ │ ├── drag-items.html │ │ ├── drag-shapes-2.html │ │ ├── drag-shapes.html │ │ ├── drag-single-shape.html │ │ ├── drag-sort-numbers.html │ │ ├── draw-circle.html │ │ ├── draw-line.html │ │ ├── email-inbox-delete.html │ │ ├── email-inbox-forward-nl-turk.html │ │ ├── email-inbox-forward-nl.html │ │ ├── email-inbox-forward.html │ │ ├── email-inbox-important.html │ │ ├── email-inbox-nl-turk.html │ │ ├── email-inbox-noscroll.html │ │ ├── email-inbox-reply.html │ │ ├── email-inbox-star-reply.html │ │ ├── email-inbox.html │ │ ├── enter-date.html │ │ ├── enter-password.html │ │ ├── enter-text-2.html │ │ ├── enter-text-dynamic.html │ │ ├── enter-text.html │ │ ├── enter-time.html │ │ ├── find-greatest.html │ │ ├── find-midpoint.html │ │ ├── find-word.html │ │ ├── focus-text-2.html │ │ ├── focus-text.html │ │ ├── form-sequence-2.html │ │ ├── form-sequence-3.html │ │ ├── form-sequence.html │ │ ├── generate-number.html │ │ ├── grid-coordinate.html │ │ ├── guess-number.html │ │ ├── highlight-text-2.html │ │ ├── highlight-text.html │ │ ├── hot-cold.html │ │ ├── hover-shape.html │ │ ├── identify-shape.html │ │ ├── login-user-popup.html │ │ ├── login-user.html │ │ ├── moving-items.html │ │ ├── multi-layouts.html │ │ ├── multi-orderings.html │ │ ├── navigate-tree.html │ │ ├── number-checkboxes.html │ │ ├── odd-or-even.html │ │ ├── order-food.html │ │ ├── phone-book.html │ │ ├── read-table-2.html │ │ ├── read-table.html │ │ ├── resize-textarea.html │ │ ├── right-angle.html │ │ ├── scroll-text-2.html │ │ ├── scroll-text.html │ │ ├── search-engine.html │ │ ├── sign-agreement.html │ │ ├── simon-says.html │ │ ├── simple-algebra.html │ │ ├── simple-arithmetic.html │ │ ├── social-media-all.html │ │ ├── social-media-some.html │ │ ├── social-media.html │ │ ├── stock-market.html │ │ ├── terminal.html │ │ ├── text-editor.html │ │ ├── text-transform.html │ │ ├── tic-tac-toe.html │ │ ├── unicode-test.html │ │ ├── use-autocomplete-nodelay.html │ │ ├── use-autocomplete.html │ │ ├── use-colorwheel-2.html │ │ ├── use-colorwheel.html │ │ ├── use-slider-2.html │ │ ├── use-slider.html │ │ ├── use-spinner.html │ │ └── visual-addition.html ├── http_server.py ├── observation.py ├── registration.py ├── reward.py ├── screenshot.py ├── scripts │ ├── dump_observation.py │ ├── gen_env_classes.py │ └── record.py ├── selenium_actions.py ├── selenium_instance.py └── spaces.py ├── miniwobplusplus-text.png ├── py.Dockerfile ├── pyproject.toml ├── setup.py ├── tests ├── __init__.py ├── test_action.py ├── test_api.py ├── test_environment.py ├── test_spaces.py └── utils.py └── viewer ├── main.js ├── style.css └── viewer.html /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: Farama-Foundation 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Submit a bug report 4 | title: "[Bug Report] Bug title" 5 | 6 | --- 7 | 8 | If you are submitting a bug report, please fill in the following details and use the tag [bug]. 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **Code example** 14 | Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful. 15 | 16 | **System Info** 17 | Describe the characteristic of your environment: 18 | * Describe how miniwob-plusplus was installed (pip, docker, source, ...) 19 | * What OS/version of Linux you're using. Note that while we will accept PRs to improve Window's support, we do not officially support it. 20 | * Python version 21 | 22 | **Additional context** 23 | Add any other context about the problem here. 24 | 25 | ### Checklist 26 | 27 | - [ ] I have checked that there is no similar [issue](https://github.com/Farama-Foundation/miniwob-plusplus/issues) in the repo (**required**) 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/proposal.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Proposal 3 | about: Propose changes that are not fixes bugs 4 | title: "[Proposal] Proposal title" 5 | --- 6 | 7 | ### Proposal 8 | 9 | A clear and concise description of the proposal. 10 | 11 | ### Motivation 12 | 13 | Please outline the motivation for the proposal. 14 | Is your feature request related to a problem? e.g.,"I'm always frustrated when [...]". 15 | If this is related to another GitHub issue, please link here too. 16 | 17 | ### Pitch 18 | 19 | A clear and concise description of what you want to happen. 20 | 21 | ### Alternatives 22 | 23 | A clear and concise description of any alternative solutions or features you've considered, if any. 24 | 25 | ### Additional context 26 | 27 | Add any other context or screenshots about the feature request here. 28 | 29 | ### Checklist 30 | 31 | - [ ] I have checked that there is no similar [issue](https://github.com/Farama-Foundation/miniwob-plusplus/issues) in the repo (**required**) 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask a question 4 | title: "[Question] Question title" 5 | --- 6 | 7 | 8 | ### Question 9 | 10 | If you're a beginner and have basic questions, please ask on [r/reinforcementlearning](https://www.reddit.com/r/reinforcementlearning/) or in the [RL Discord](https://discord.com/invite/xhfNqQv) (if you're new please use the beginners channel). Basic questions that are not bugs or feature requests will be closed without reply, because GitHub issues are not an appropriate venue for these. 11 | 12 | Advanced/nontrivial questions, especially in areas where documentation is lacking, are very much welcome. 13 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. 4 | 5 | Fixes # (issue) 6 | 7 | ## Type of change 8 | 9 | Please delete options that are not relevant. 10 | 11 | - [ ] Bug fix (non-breaking change which fixes an issue) 12 | - [ ] New feature (non-breaking change which adds functionality) 13 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) 14 | - [ ] This change requires a documentation update 15 | 16 | ### Screenshots 17 | Please attach before and after screenshots of the change if applicable. 18 | 19 | 29 | 30 | # Checklist: 31 | 32 | - [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with `pre-commit run --all-files` (see `CONTRIBUTING.md` instructions to set it up) 33 | - [ ] I have commented my code, particularly in hard-to-understand areas 34 | - [ ] I have made corresponding changes to the documentation 35 | - [ ] My changes generate no new warnings 36 | - [ ] I have added tests that prove my fix is effective or that my feature works 37 | - [ ] New and existing unit tests pass locally with my changes 38 | 39 | 46 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | # Number of days of inactivity before an Issue or Pull Request becomes stale 4 | daysUntilStale: 60 5 | 6 | # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. 7 | # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. 8 | daysUntilClose: 14 9 | 10 | # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) 11 | onlyLabels: 12 | - more-information-needed 13 | 14 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable 15 | exemptLabels: 16 | - pinned 17 | - security 18 | - "[Status] Maybe Later" 19 | 20 | # Set to true to ignore issues in a project (defaults to false) 21 | exemptProjects: true 22 | 23 | # Set to true to ignore issues in a milestone (defaults to false) 24 | exemptMilestones: true 25 | 26 | # Set to true to ignore issues with an assignee (defaults to false) 27 | exemptAssignees: true 28 | 29 | # Label to use when marking as stale 30 | staleLabel: stale 31 | 32 | # Comment to post when marking as stale. Set to `false` to disable 33 | markComment: > 34 | This issue has been automatically marked as stale because it has not had 35 | recent activity. It will be closed if no further activity occurs. Thank you 36 | for your contributions. 37 | 38 | # Comment to post when removing the stale label. 39 | # unmarkComment: > 40 | # Your comment here. 41 | 42 | # Comment to post when closing a stale Issue or Pull Request. 43 | # closeComment: > 44 | # Your comment here. 45 | 46 | # Limit the number of actions per hour, from 1-30. Default is 30 47 | limitPerRun: 30 48 | 49 | # Limit to only `issues` or `pulls` 50 | only: issues 51 | 52 | # Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': 53 | # pulls: 54 | # daysUntilStale: 30 55 | # markComment: > 56 | # This pull request has been automatically marked as stale because it has not had 57 | # recent activity. It will be closed if no further activity occurs. Thank you 58 | # for your contributions. 59 | 60 | # issues: 61 | # exemptLabels: 62 | # - confirmed -------------------------------------------------------------------------------- /.github/workflows/build-docs.yml: -------------------------------------------------------------------------------- 1 | name: Build main branch documentation website 2 | on: 3 | push: 4 | branches: [master] 5 | permissions: 6 | contents: write 7 | jobs: 8 | docs: 9 | name: Generate Website 10 | runs-on: ubuntu-latest 11 | env: 12 | SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} 13 | steps: 14 | - uses: actions/checkout@v3 15 | 16 | - uses: actions/setup-python@v4 17 | with: 18 | python-version: '3.9' 19 | 20 | - name: Install dependencies 21 | run: pip install -r docs/requirements.txt 22 | 23 | - name: Install MiniWoB++ 24 | run: pip install -e . 25 | 26 | - name: Build Envs Docs 27 | run: python docs/_scripts/gen_mds.py 28 | 29 | - name: Build List of Environments 30 | run: python docs/_scripts/gen_env_list.py 31 | 32 | - name: Build 33 | run: sphinx-build -b dirhtml -v docs _build 34 | 35 | - name: Move 404 36 | run: mv _build/404/index.html _build/404.html 37 | 38 | - name: Update 404 links 39 | run: python docs/_scripts/move_404.py _build/404.html 40 | 41 | - name: Remove .doctrees 42 | run: rm -r _build/.doctrees 43 | 44 | - name: Upload to GitHub Pages 45 | uses: JamesIves/github-pages-deploy-action@v4 46 | with: 47 | folder: _build 48 | -------------------------------------------------------------------------------- /.github/workflows/build-publish.yaml: -------------------------------------------------------------------------------- 1 | # This workflow will build and (if release) publish Python distributions to PyPI 2 | # For more information see: 3 | # - https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions 4 | # - https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ 5 | # 6 | # derived from https://github.com/Farama-Foundation/PettingZoo/blob/e230f4d80a5df3baf9bd905149f6d4e8ce22be31/.github/workflows/build-publish.yml 7 | name: build-publish 8 | 9 | on: 10 | push: 11 | branches: [main] 12 | pull_request: 13 | branches: [main] 14 | release: 15 | types: [published] 16 | 17 | jobs: 18 | build-wheels: 19 | runs-on: ${{ matrix.os }} 20 | strategy: 21 | matrix: 22 | include: 23 | - os: ubuntu-latest 24 | python: 37 25 | platform: manylinux_x86_64 26 | - os: ubuntu-latest 27 | python: 38 28 | platform: manylinux_x86_64 29 | - os: ubuntu-latest 30 | python: 39 31 | platform: manylinux_x86_64 32 | - os: ubuntu-latest 33 | python: 310 34 | platform: manylinux_x86_64 35 | - os: ubuntu-latest 36 | python: 311 37 | platform: manylinux_x86_64 38 | 39 | steps: 40 | - uses: actions/checkout@v3 41 | - name: Set up Python 42 | uses: actions/setup-python@v4 43 | with: 44 | python-version: '3.x' 45 | - name: Install dependencies 46 | run: python -m pip install --upgrade pip setuptools build 47 | - name: Build sdist and wheels 48 | run: python -m build 49 | - name: Store wheels 50 | uses: actions/upload-artifact@v3 51 | with: 52 | path: dist 53 | 54 | publish: 55 | runs-on: ubuntu-latest 56 | needs: 57 | - build-wheels 58 | if: github.event_name == 'release' && github.event.action == 'published' 59 | steps: 60 | - name: Download dists 61 | uses: actions/download-artifact@v3 62 | with: 63 | name: artifact 64 | path: dist 65 | - name: Publish 66 | uses: pypa/gh-action-pypi-publish@release/v1 67 | with: 68 | password: ${{ secrets.PYPI_API_TOKEN }} 69 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | on: [pull_request, push] 3 | 4 | permissions: 5 | contents: read # to fetch code (actions/checkout) 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | timeout-minutes: 15 11 | strategy: 12 | matrix: 13 | python-version: ['3.8', '3.9', '3.10', '3.11'] 14 | steps: 15 | - uses: actions/checkout@v2 16 | - run: | 17 | docker build -f py.Dockerfile \ 18 | --build-arg PYTHON_VERSION=${{ matrix.python-version }} \ 19 | --tag miniwob-plusplus-docker . 20 | - name: Run tests 21 | run: docker run --shm-size=256m miniwob-plusplus-docker pytest --timeout=20 22 | -------------------------------------------------------------------------------- /.github/workflows/pre-commit.yml: -------------------------------------------------------------------------------- 1 | 2 | # https://pre-commit.com 3 | # This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file. 4 | name: pre-commit 5 | on: 6 | pull_request: 7 | push: 8 | branches: [master] 9 | 10 | permissions: 11 | contents: read # to fetch code (actions/checkout) 12 | 13 | jobs: 14 | pre-commit: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v2 18 | - uses: actions/setup-python@v2 19 | with: 20 | python-version: '3.10' 21 | - run: pip install pre-commit 22 | - run: pre-commit --version 23 | - run: pre-commit install 24 | - run: pre-commit run --all-files 25 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | repos: 3 | - repo: https://github.com/python/black 4 | rev: 23.3.0 5 | hooks: 6 | - id: black 7 | - repo: https://github.com/codespell-project/codespell 8 | rev: v2.2.4 9 | hooks: 10 | - id: codespell 11 | exclude: ^(miniwob/html/)|(viewer/)|(.*\.svg$) 12 | args: 13 | - --ignore-words-list=sur,vally,nam 14 | - repo: https://github.com/PyCQA/flake8 15 | rev: 6.0.0 16 | hooks: 17 | - id: flake8 18 | args: 19 | - '--per-file-ignores=*/__init__.py:F401' 20 | - --max-complexity=30 21 | - --max-line-length=456 22 | - --show-source 23 | - --statistics 24 | - repo: https://github.com/PyCQA/isort 25 | rev: 5.12.0 26 | hooks: 27 | - id: isort 28 | args: ["--profile", "black"] 29 | - repo: https://github.com/pycqa/pydocstyle 30 | rev: 6.3.0 # pick a git hash / tag to point to 31 | hooks: 32 | - id: pydocstyle 33 | exclude: ^(tests/)|(miniwob/envs/) 34 | args: 35 | - --source 36 | - --explain 37 | - --convention=google 38 | additional_dependencies: ["toml"] 39 | - repo: https://github.com/asottile/pyupgrade 40 | rev: v3.4.0 41 | hooks: 42 | - id: pyupgrade 43 | args: ["--py37-plus"] 44 | - repo: local 45 | hooks: 46 | - id: pyright 47 | name: pyright 48 | entry: pyright 49 | language: node 50 | pass_filenames: false 51 | types: [python] 52 | additional_dependencies: ["pyright@1.1.308"] 53 | args: 54 | - --project=pyproject.toml 55 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # MiniWoB++ Contribution Guidelines 2 | 3 | We welcome: 4 | 5 | - Bug reports 6 | - Pull requests for bug fixes 7 | - Documentation improvements 8 | 9 | ## Contributing to the codebase 10 | 11 | ### Coding 12 | 13 | Contributing code is done through standard github methods: 14 | 15 | 1. Fork this repo 16 | 2. Commit your code 17 | 3. Submit a pull request. It will be reviewed by maintainers and they'll give feedback or make requests as applicable 18 | 19 | ### Considerations 20 | - Make sure your new code is properly tested and fully-covered 21 | - Any fixes to environments should include fixes to the appropriate documentation 22 | 23 | ### Git hooks 24 | The CI will run several checks on the new code pushed to the MiniWoB++ repository. These checks can also be run locally without waiting for the CI by following the steps below: 25 | 1. [install `pre-commit`](https://pre-commit.com/#install), 26 | 2. install the Git hooks by running `pre-commit install`. 27 | 28 | Once those two steps are done, the Git hooks will be run automatically at every new commit. The Git hooks can also be run manually with `pre-commit run --all-files`, and if needed they can be skipped (not recommended) with `git commit --no-verify`. **Note:** you may have to run `pre-commit run --all-files` manually a couple of times to make it pass when you commit, as each formatting tool will first format the code and fail the first time but should pass the second time. 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright 2016 OpenAI (as part of https://github.com/openai/universe) 4 | Copyright 2018 The Board of Trustees of The Leland Stanford Junior University 5 | Copyright 2022 Farama Foundation 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | environments/*.md 2 | _build/ 3 | demos/ -------------------------------------------------------------------------------- /docs/404.md: -------------------------------------------------------------------------------- 1 | # 404 - Page Not Found 2 | 3 | ## The requested page could not be found. 4 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # MiniWoB++ documentation 2 | 3 | This directory contains the documentation for MiniWoB++. 4 | 5 | For more information about how to contribute to the documentation go to our [CONTRIBUTING.md](https://github.com/Farama-Foundation/Celshast/blob/main/CONTRIBUTING.md) 6 | 7 | ## Build the Documentation 8 | 9 | Install the required packages and Gymnasium (or your fork): 10 | 11 | ``` 12 | pip install -r docs/requirements.txt 13 | pip install -e . 14 | ``` 15 | 16 | To generate the environment pages: 17 | 18 | ``` 19 | python docs/_scripts/gen_mds.py 20 | python docs/_scripts/gen_env_list.py 21 | ``` 22 | 23 | To build the documentation once: 24 | 25 | ``` 26 | cd docs 27 | sphinx-build . _build 28 | ``` 29 | 30 | To rebuild the documentation automatically every time a change is made: 31 | 32 | ``` 33 | pip install sphinx-autobuild 34 | cd docs 35 | sphinx-autobuild . _build 36 | ``` 37 | -------------------------------------------------------------------------------- /docs/_scripts/move_404.py: -------------------------------------------------------------------------------- 1 | """Move 404.md to the _build directory.""" 2 | import sys 3 | 4 | 5 | if __name__ == "__main__": 6 | if len(sys.argv) < 2: 7 | print("Provide a path") 8 | filePath = sys.argv[1] 9 | 10 | with open(filePath, "r+") as fp: 11 | content = fp.read() 12 | content = content.replace('href="../', 'href="/').replace('src="../', 'src="/') 13 | fp.seek(0) 14 | fp.truncate() 15 | 16 | fp.write(content) 17 | -------------------------------------------------------------------------------- /docs/_scripts/utils.py: -------------------------------------------------------------------------------- 1 | """Utilities for documentation generation.""" 2 | import logging 3 | 4 | import gymnasium as gym 5 | 6 | 7 | def get_all_registered_miniwob_envs(): 8 | """Return all registered MiniWoB environments.""" 9 | envs = [] 10 | for env_spec in gym.registry.values(): 11 | if env_spec.namespace == "miniwob": 12 | envs.append(env_spec) 13 | return sorted(envs, key=lambda x: x.name) 14 | 15 | 16 | def trim_docstring(docstring): 17 | """Format whitespaces in the docstring.""" 18 | if not docstring: 19 | return "" 20 | # Convert tabs to spaces (following the normal Python rules) 21 | # and split into a list of lines: 22 | lines = docstring.expandtabs().splitlines() 23 | # Determine minimum indentation (first line doesn't count): 24 | indent = 232323 25 | for line in lines[1:]: 26 | stripped = line.lstrip() 27 | if stripped: 28 | indent = min(indent, len(line) - len(stripped)) 29 | # Remove indentation (first line is special): 30 | trimmed = [lines[0].strip()] 31 | if indent < 232323: 32 | for line in lines[1:]: 33 | trimmed.append(line[indent:].rstrip()) 34 | # Strip off trailing and leading blank lines: 35 | while trimmed and not trimmed[-1]: 36 | trimmed.pop() 37 | while trimmed and not trimmed[0]: 38 | trimmed.pop(0) 39 | # Return a single string: 40 | return "\n".join(trimmed) 41 | 42 | 43 | def extract_description_from_docstring(docstring): 44 | """Extract the task description for the docstring.""" 45 | if not docstring: 46 | return "" 47 | lines = [line.strip() for line in docstring.splitlines() if line.strip()] 48 | if lines[0] != "## Description": 49 | logging.warning(f"Invalid docstring header: {lines[0]}") 50 | return "" 51 | return lines[1] 52 | -------------------------------------------------------------------------------- /docs/_static/img/custom-environment-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/docs/_static/img/custom-environment-1.png -------------------------------------------------------------------------------- /docs/_static/img/example-usage-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/docs/_static/img/example-usage-1.png -------------------------------------------------------------------------------- /docs/_static/img/example-usage-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/docs/_static/img/example-usage-2.png -------------------------------------------------------------------------------- /docs/_static/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/docs/_static/img/favicon.png -------------------------------------------------------------------------------- /docs/_static/img/miniwobplusplus-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/docs/_static/img/miniwobplusplus-github.png -------------------------------------------------------------------------------- /docs/_static/img/miniwobplusplus-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/docs/_static/img/miniwobplusplus-text.png -------------------------------------------------------------------------------- /docs/_static/img/showcase-static.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/docs/_static/img/showcase-static.png -------------------------------------------------------------------------------- /docs/_static/img/showcase.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/docs/_static/img/showcase.gif -------------------------------------------------------------------------------- /docs/_static/videos/miniwob.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/docs/_static/videos/miniwob.mp4 -------------------------------------------------------------------------------- /docs/content/demonstrations.md: -------------------------------------------------------------------------------- 1 | # Demonstrations 2 | 3 | We have recorded demonstrations from Mechanical Turk and put them in a [separate repository](https://github.com/stanfordnlp/miniwob-plusplus-demos). 4 | 5 | ## Demonstration Format 6 | 7 | Each demonstration is saved as a JSON file. The root object generated by `core/record.js` contains the following fields: 8 | 9 | * `taskName` (string) 10 | * `utterance` (string) 11 | * `reward` (number): Reward as defined by the task 12 | * `rawReward` (number): 1 if succeeded and -1 if failed 13 | * `states`: a list of state objects 14 | * One state is recorded for the initial state 15 | * Two states are recorded for each event, one before the event resolves and one after the event resolves 16 | 17 | Each state object has the following fields: 18 | 19 | * `time` (number): Time elapsed since the episode started 20 | * `action`: An action-specific object (not present for the initial state) with the following common keys: 21 | * `type` (string) 22 | * `timing` (number): the `eventPhase` property of the JS event object. 23 | This is 1 before the event resolves (capturing state) and 3 after the event resolves (bubbling state). 24 | * `dom`: The DOM info as generated by `getDOMInfo()` 25 | * The event target will have a special key `recordingTarget` set to `true`. 26 | 27 | ## Recording Your Own Demonstrations 28 | 29 | 1. Start the recording server: 30 | ``` 31 | # Create an output directory 32 | mkdir out/ 33 | python -m miniwob.record out/ 34 | ``` 35 | 36 | 2. Append `?record=true` to the URL of the task you want to record. For example, for the `click-test` task, go to 37 | ``` 38 | file:///path/to/miniwob-plusplus/html/miniwob/click-test.html?record=true 39 | ``` 40 | (Note: For recent versions of Chrome, you might have to retype the whole URL instead of just appending `?record=true`.) 41 | 42 | 3. To view the results, open `viewer/viewer.html` while the recording server is running. The URL should be like 43 | ``` 44 | file:///path/to/miniwob-plusplus/html/viewer/viewer.html 45 | ``` 46 | 47 | -------------------------------------------------------------------------------- /docs/content/getting_started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ## Install the MiniWoB++ Library 4 | 5 | To install the MiniWoB++ library, use `pip install miniwob`. 6 | 7 | Alternatively, clone the repository from GitHub: 8 | 9 | ```sh 10 | git clone https://github.com/Farama-Foundation/miniwob-plusplus.git 11 | cd miniwob-plusplus 12 | pip install -e . 13 | ``` 14 | 15 | If this gives you problems, try again and add pip's `--ignore-installed` flag. 16 | 17 | ## Install Chrome/Chromium and ChromeDriver 18 | 19 | We strongly recommend using Chrome or Chromium as the web browser, 20 | as other browsers may render the environments differently. 21 | 22 | The MiniWoB++ Python interface uses [Selenium](https://www.selenium.dev/documentation/webdriver/), 23 | which interacts with the browser via the [WebDriver API](https://w3c.github.io/webdriver/). 24 | Follow one of the 25 | [instruction methods](https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/) 26 | to install ChromeDriver. The simplest method is to 27 | [download](https://chromedriver.chromium.org/downloads) ChromeDriver with the matching version, 28 | unzip it, and then add the directory containing the `chromedriver` executable to the `PATH` environment variable: 29 | 30 | ```sh 31 | export PATH=$PATH:/path/to/chromedriver 32 | ``` 33 | 34 | For Chromium, the driver may also be available in a software package; for example, in Debian/Ubuntu: 35 | 36 | ```sh 37 | sudo apt install chromium-driver 38 | ``` 39 | 40 | ## Development Environment 41 | 42 | For information about setting up a development environment, 43 | see [`CONTRIBUTING.md`](https://github.com/Farama-Foundation/miniwob-plusplus/blob/master/CONTRIBUTING.md). 44 | -------------------------------------------------------------------------------- /docs/content/reward.md: -------------------------------------------------------------------------------- 1 | # Reward 2 | 3 | In all environments, the reward is 0 during the episode, and a value in the range -1 to 1 (inclusive) 4 | when the episode terminates. 5 | 6 | ## Reward processor 7 | 8 | Originally, any positive reward is scaled by the remaining time on the timer. 9 | Some environments also give partial rewards for partially correct answers 10 | (see the documentation or docstring of each environment for details). 11 | 12 | A **reward processor** can be used to returns custom rewards that ignore 13 | the time penalty or partial rewards. A reward processor can be specified during 14 | environment initialization: 15 | 16 | ```python 17 | import gymnasium 18 | from miniwob.reward import get_binary_reward 19 | 20 | env = gymnasium.make('miniwob/ascending-numbers-v1', reward_processor=get_binary_reward) 21 | ``` 22 | 23 | The available reward processors include: 24 | 25 | * `get_original_reward`: Returns the original reward. This is the default. 26 | * `get_raw_reward`: Returns the raw reward without time penalty. 27 | * `get_binary_reward`: Returns the binary reward without time penalty or partial reward. The terminal reward will be either -1 or 1. This is used in most previous publications. 28 | * `get_thresholded_reward`: Returns the binary reward without time penalty or partial reward, but with any partial reward ≥ the specified threshold being treated as 1. This is needed for tasks that give continuous-valued partial rewards depending on how close the answer is to the correct answer. To specify this method as the reward processor, use `lambda metadata: get_thresholded_reward(metadata, threshold=VALUE)` or `functools.partial(get_thresholded_reward, threshold=VALUE)`. 29 | -------------------------------------------------------------------------------- /docs/content/viewing.md: -------------------------------------------------------------------------------- 1 | # Viewing the Environments 2 | 3 | There are 2 ways to view the environments: 4 | 5 | * **Run a simple server:** 6 | 7 | * **Node.js:** Install and run `http-server` using 8 | ``` 9 | npm install http-server -g # Requires Node.js 10 | cd miniwob/html/ 11 | http-server 12 | ``` 13 | The tasks should now be accessible at `http://localhost:8080/miniwob/`. 14 | 15 | * **Python:** 16 | ``` 17 | cd miniwob/html/ 18 | python -m http.server 8080 19 | ``` 20 | We found this method to be less stable with a large amount of access, 21 | which is required by reinforcement learning. 22 | 23 | * **Use the `file://` protocol:** open `miniwob/html/miniwob/` in the browser. 24 | * The URL should now be something like 25 | 26 | file:///path/to/miniwob/html/miniwob/ 27 | 28 | * This should show the directory listing of all task HTML files. 29 | 30 | -------------------------------------------------------------------------------- /docs/environments/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/docs/environments/.gitkeep -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | hide-toc: true 3 | firstpage: 4 | lastpage: 5 | --- 6 | 7 | 8 | ```{project-logo} _static/img/miniwobplusplus-text.png 9 | :alt: MiniWoB logo 10 | ``` 11 | 12 | ```{image} _static/img/showcase.gif 13 | :width: 100% 14 | :align: center 15 | ``` 16 | 17 | The MiniWoB++ library contains a collection of over 100 **web interaction environments**, 18 | along with JavaScript and Python interfaces for programmatically interacting with them. 19 | The Python interface follows the [Gymnasium](https://gymnasium.farama.org/) API 20 | and uses [Selenium WebDriver](https://www.selenium.dev/documentation/webdriver/) 21 | to perform actions on the web browser. 22 | 23 | MiniWoB++ is an extension of the 24 | [OpenAI MiniWoB benchmark](http://proceedings.mlr.press/v70/shi17a/shi17a.pdf), 25 | and was introduced in the paper 26 | [Reinforcement Learning on Web Interfaces using Workflow-Guided 27 | Exploration](https://arxiv.org/abs/1802.08802). 28 | 29 | The Gymnasium interface allows an agent to initialize and interact with a MiniWoB++ environment as follows: 30 | ```python 31 | import gymnasium 32 | import miniwob 33 | gymnasium.register_envs(miniwob) 34 | env = gymnasium.make('miniwob/click-test-2-v1', render_mode='human') 35 | try: 36 | observation, info = env.reset(seed=42) 37 | for _ in range(1000): 38 | action = policy(observation) # User-defined policy function 39 | observation, reward, terminated, truncated, info = env.step(action) 40 | if terminated: 41 | observation, info = env.reset() 42 | finally: 43 | env.close() 44 | ``` 45 | 46 | ```{toctree} 47 | :hidden: 48 | :caption: Introduction 49 | 50 | content/getting_started 51 | content/basic_usage 52 | ``` 53 | 54 | ```{toctree} 55 | :hidden: 56 | :caption: API 57 | 58 | content/observation_space 59 | content/action_space 60 | content/reward 61 | ``` 62 | 63 | ```{toctree} 64 | :hidden: 65 | :caption: Environments 66 | 67 | content/viewing 68 | environments/list 69 | content/custom_environment 70 | content/javascript_api 71 | content/demonstrations 72 | ``` 73 | 74 | ```{toctree} 75 | :hidden: 76 | :caption: Development 77 | 78 | Github 79 | Contribute to the Docs 80 | ``` 81 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx 2 | myst-parser 3 | git+https://github.com/Farama-Foundation/Celshast#egg=furo 4 | pandas 5 | tabulate 6 | -------------------------------------------------------------------------------- /miniwob/__init__.py: -------------------------------------------------------------------------------- 1 | """Root `__init__` of the miniwob module.""" 2 | import sys 3 | 4 | from miniwob.registration import register_miniwob_envs 5 | 6 | 7 | __version__ = "1.0.1" 8 | 9 | register_miniwob_envs() 10 | 11 | try: 12 | from farama_notifications import notifications 13 | 14 | if ( 15 | "miniwob-plusplus" in notifications 16 | and __version__ in notifications["miniwob-plusplus"] 17 | ): 18 | print(notifications["miniwob-plusplus"][__version__], file=sys.stderr) 19 | 20 | except Exception: # nosec 21 | pass 22 | -------------------------------------------------------------------------------- /miniwob/envs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/envs/__init__.py -------------------------------------------------------------------------------- /miniwob/envs/flightwob_envs.py: -------------------------------------------------------------------------------- 1 | """Environments for FlightWoB tasks.""" 2 | 3 | from miniwob.environment import MiniWoBEnvironment 4 | 5 | 6 | class FlightAAEnv(MiniWoBEnvironment): 7 | """ 8 | ## Description 9 | 10 | Search for flights on the American Airlines website. 11 | 12 | ## Utterance 13 | 14 | The utterance is the JSON serialization of the utterance fields. 15 | 16 | ## Utterance fields 17 | 18 | * Departure City 19 | * Departure Day 20 | * Departure Month 21 | * Destination City 22 | * One Way or Round Trip 23 | * Returning Day 24 | * Returning Month 25 | 26 | ## Additional notes 27 | 28 | * **Partial reward:** If all required fields are filled, the partial reward is the fraction of correct fields. 29 | * The instructions come from a fixed set from the original FlightWoB dataset. Use the `set_data_mode` method of the environment to switch between the train and test scenarios. 30 | """ 31 | 32 | subdomain = "flight.AA" 33 | 34 | 35 | class FlightAlaskaEnv(MiniWoBEnvironment): 36 | """ 37 | ## Description 38 | 39 | Search for flights on the Alaska Airlines website (original). 40 | 41 | ## Utterance 42 | 43 | The utterance is the JSON serialization of the utterance fields. 44 | 45 | ## Utterance fields 46 | 47 | * Departure City 48 | * Departure Day 49 | * Departure Month 50 | * Destination City 51 | * One Way or Round Trip 52 | * Returning Day 53 | * Returning Month 54 | 55 | ## Additional notes 56 | 57 | * **Partial reward:** If all required fields are filled, the partial reward is the fraction of correct fields. 58 | * The instructions come from a fixed set from the original FlightWoB dataset. Use the `set_data_mode` method of the environment to switch between the train and test scenarios. 59 | """ 60 | 61 | subdomain = "flight.Alaska" 62 | 63 | 64 | class FlightAlaskaAutoEnv(MiniWoBEnvironment): 65 | """ 66 | ## Description 67 | 68 | Search for flights on the Alaska Airlines website (harder). 69 | 70 | ## Utterance 71 | 72 | The utterance is the JSON serialization of the utterance fields. 73 | 74 | ## Utterance fields 75 | 76 | * Departure City 77 | * Departure Day 78 | * Destination City 79 | * Passengers 80 | * Returning Day 81 | * Seat type 82 | * Ticket Type 83 | 84 | ## Additional notes 85 | 86 | * **Partial reward:** If all required fields are filled, the partial reward is the fraction of correct fields. 87 | * The instructions are automatically generated. 88 | """ 89 | 90 | subdomain = "flight.Alaska-auto" 91 | -------------------------------------------------------------------------------- /miniwob/html/.gitignore: -------------------------------------------------------------------------------- 1 | twistd.pid 2 | -------------------------------------------------------------------------------- /miniwob/html/common/special/checkbox-numbers/ch_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/checkbox-numbers/ch_0.png -------------------------------------------------------------------------------- /miniwob/html/common/special/checkbox-numbers/ch_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/checkbox-numbers/ch_1.png -------------------------------------------------------------------------------- /miniwob/html/common/special/checkbox-numbers/ch_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/checkbox-numbers/ch_2.png -------------------------------------------------------------------------------- /miniwob/html/common/special/checkbox-numbers/ch_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/checkbox-numbers/ch_3.png -------------------------------------------------------------------------------- /miniwob/html/common/special/checkbox-numbers/ch_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/checkbox-numbers/ch_4.png -------------------------------------------------------------------------------- /miniwob/html/common/special/checkbox-numbers/ch_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/checkbox-numbers/ch_5.png -------------------------------------------------------------------------------- /miniwob/html/common/special/checkbox-numbers/ch_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/checkbox-numbers/ch_6.png -------------------------------------------------------------------------------- /miniwob/html/common/special/checkbox-numbers/ch_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/checkbox-numbers/ch_7.png -------------------------------------------------------------------------------- /miniwob/html/common/special/checkbox-numbers/ch_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/checkbox-numbers/ch_8.png -------------------------------------------------------------------------------- /miniwob/html/common/special/checkbox-numbers/ch_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/checkbox-numbers/ch_9.png -------------------------------------------------------------------------------- /miniwob/html/common/special/drag-cube/blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/drag-cube/blank.png -------------------------------------------------------------------------------- /miniwob/html/common/special/email-inbox/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/email-inbox/delete.png -------------------------------------------------------------------------------- /miniwob/html/common/special/email-inbox/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/email-inbox/forward.png -------------------------------------------------------------------------------- /miniwob/html/common/special/email-inbox/left-arrow-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/email-inbox/left-arrow-white.png -------------------------------------------------------------------------------- /miniwob/html/common/special/email-inbox/left-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/email-inbox/left-arrow.png -------------------------------------------------------------------------------- /miniwob/html/common/special/email-inbox/reply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/email-inbox/reply.png -------------------------------------------------------------------------------- /miniwob/html/common/special/email-inbox/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/email-inbox/search.png -------------------------------------------------------------------------------- /miniwob/html/common/special/email-inbox/send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/email-inbox/send.png -------------------------------------------------------------------------------- /miniwob/html/common/special/email-inbox/star-clicked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/email-inbox/star-clicked.png -------------------------------------------------------------------------------- /miniwob/html/common/special/email-inbox/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/email-inbox/star.png -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/ajax-loader.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/file.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/folder-closed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/folder-closed.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/folder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/folder.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/minus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/minus.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/plus.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/treeview-black-line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/treeview-black-line.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/treeview-black.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/treeview-black.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/treeview-default-line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/treeview-default-line.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/treeview-default.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/treeview-default.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/treeview-famfamfam-line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/treeview-famfamfam-line.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/treeview-famfamfam.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/treeview-famfamfam.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/treeview-gray-line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/treeview-gray-line.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/treeview-gray.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/treeview-gray.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/treeview-red-line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/treeview-red-line.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/navigate-tree/images/treeview-red.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/navigate-tree/images/treeview-red.gif -------------------------------------------------------------------------------- /miniwob/html/common/special/order-food/dairy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/order-food/dairy.png -------------------------------------------------------------------------------- /miniwob/html/common/special/order-food/gluten-free.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/order-food/gluten-free.png -------------------------------------------------------------------------------- /miniwob/html/common/special/order-food/meat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/order-food/meat.png -------------------------------------------------------------------------------- /miniwob/html/common/special/order-food/peanuts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/order-food/peanuts.png -------------------------------------------------------------------------------- /miniwob/html/common/special/order-food/vegan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/order-food/vegan.png -------------------------------------------------------------------------------- /miniwob/html/common/special/social-media/like-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/social-media/like-hover.png -------------------------------------------------------------------------------- /miniwob/html/common/special/social-media/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/social-media/like.png -------------------------------------------------------------------------------- /miniwob/html/common/special/social-media/more-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/social-media/more-hover.png -------------------------------------------------------------------------------- /miniwob/html/common/special/social-media/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/social-media/more.png -------------------------------------------------------------------------------- /miniwob/html/common/special/social-media/reply-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/social-media/reply-hover.png -------------------------------------------------------------------------------- /miniwob/html/common/special/social-media/reply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/social-media/reply.png -------------------------------------------------------------------------------- /miniwob/html/common/special/social-media/retweet-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/social-media/retweet-hover.png -------------------------------------------------------------------------------- /miniwob/html/common/special/social-media/retweet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/social-media/retweet.png -------------------------------------------------------------------------------- /miniwob/html/common/special/social-media/share-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/social-media/share-hover.png -------------------------------------------------------------------------------- /miniwob/html/common/special/social-media/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/social-media/share.png -------------------------------------------------------------------------------- /miniwob/html/common/special/tic-tac-toe/o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/tic-tac-toe/o.png -------------------------------------------------------------------------------- /miniwob/html/common/special/tic-tac-toe/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/common/special/tic-tac-toe/x.png -------------------------------------------------------------------------------- /miniwob/html/core/core.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #555; 3 | font-family: Arial; 4 | font-size: 14px; 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | #wrap { 10 | height:210px; 11 | background-color: white; 12 | width:160px; 13 | } 14 | 15 | #query { 16 | background-color: #FF0; 17 | font-size: 10px; 18 | height: 44px; 19 | padding: 3px; 20 | } 21 | 22 | #area { 23 | font-size: 10px; 24 | padding: 2px; 25 | } 26 | 27 | #area input[type=text] { 28 | width: 120px; 29 | } 30 | 31 | #area textarea { 32 | height: 25px; 33 | width: 120px; 34 | } 35 | 36 | #query .bold, #area .bold { font-weight: bold; } 37 | 38 | /* reward display CSS below */ 39 | #reward-display { 40 | font-size: 14px; 41 | height: 210px; 42 | width: 160px; 43 | position: absolute; 44 | left: 165px; 45 | top: 0px; 46 | } 47 | 48 | #reward-display .info { 49 | display: block; 50 | margin: 10px 5px; 51 | } 52 | 53 | #reward-last, #reward-avg, #timer-countdown, #episode-id { 54 | font-weight: bold; 55 | } 56 | 57 | #reward-avg { 58 | display: inline-block; 59 | } 60 | 61 | #area button.secondary-action { 62 | padding: 6px 25px; 63 | } 64 | 65 | /* task cover for synchronization */ 66 | #sync-task-cover { 67 | position: absolute; 68 | left: 0; 69 | top: 0; 70 | width: 160px; 71 | height: 210px; 72 | background-color: #111; 73 | color: #eee; 74 | text-align: center; 75 | line-height: 210px; 76 | font-size: 20px; 77 | cursor: pointer; 78 | z-index: 9999; 79 | } 80 | #sync-task-cover.transparent { 81 | background-color: transparent; 82 | color: transparent; 83 | cursor: not-allowed; 84 | } 85 | 86 | /* canvas for tracking clicks */ 87 | #click-canvas { 88 | position: absolute; 89 | left: 165px; 90 | top: 0px; 91 | background-color: white; 92 | } 93 | /* canvas for visualizing attention */ 94 | #attention-canvas { 95 | position: absolute; 96 | left: 330px; 97 | top: 0px; 98 | background-color: black; 99 | } 100 | 101 | /* Record demonstrations */ 102 | #server-name, #server-reply { 103 | font-size: 80%; 104 | } 105 | -------------------------------------------------------------------------------- /miniwob/html/core/jquery-ui-hacks.js: -------------------------------------------------------------------------------- 1 | // Hacks to make JQuery UI deterministic 2 | 3 | $(function () { 4 | var uuid = 0; 5 | 6 | $.extend({ 7 | resetUniqueId: function () { 8 | uuid = 0; 9 | }, 10 | }); 11 | 12 | $.fn.extend({ 13 | uniqueId: function () { 14 | return this.each(function () { 15 | if (!this.id) { 16 | this.id = "ui-id-" + ( ++uuid ); 17 | } 18 | }); 19 | }, 20 | }); 21 | 22 | }); 23 | -------------------------------------------------------------------------------- /miniwob/html/core/jquery-ui/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/core/jquery-ui/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /miniwob/html/core/jquery-ui/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/core/jquery-ui/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /miniwob/html/core/jquery-ui/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/core/jquery-ui/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /miniwob/html/core/jquery-ui/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/core/jquery-ui/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /miniwob/html/core/jquery-ui/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/core/jquery-ui/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /miniwob/html/core/jquery-ui/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/core/jquery-ui/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /miniwob/html/flight/AA/apps/common/js/aacomDevice.js: -------------------------------------------------------------------------------- 1 | var $device={mobile:false,tablet:false,desktop:true,touch:false,responsive:false,init:function(){this.desktop=(!this.tablet&&!this.mobile);this.touch=(this.tablet||this.mobile);if(this.tablet){jQuery("html").addClass("is-tablet");}if(this.mobile){jQuery("html").addClass("is-mobile");}if(this.responsive){jQuery("html").addClass("is-responsive");}},viewport:function(){if(this.responsive){var check=function(css){if(jQuery("."+css).length==0){jQuery("body").append('
');}return(jQuery("."+css).css("display")!="none");};if(check("visible-phone")){return"phone";}if(check("visible-tablet")){return"tablet";}}return"desktop";},landscape:function(){return(jQuery(window).height()'+values[i].name+"";}jQuery("select#aa-language-selector").html(options);self.changeAlert();}});});jQuery("#aa-language-selector").change(function(){self.changeAlert();});jQuery("#splashForm").submit(function(){url=jQuery("select#aa-language-selector",this).val();jQuery("#splashSelectedCountry",this).val(self.getParameter(url,"locale"));jQuery("#splashUrl",this).val(self.getParameter(url,"url"));jQuery("#splashGeoRedirect",this).val(self.getParameter(url,"georedirect"));});self.getParameter=function(url,name){return decodeURIComponent((RegExp(name+"=(.+?)(&|$)").exec(url)||[,""])[1]);};self.changeAlert=function(){if(self.getParameter(jQuery("select#aa-language-selector").val(),"locale")!=jQuery("input#currentLocale").val()){jQuery("#locale-change-alert").slideDown();}else{jQuery("#locale-change-alert").hide("fast");}};}; -------------------------------------------------------------------------------- /miniwob/html/flight/AA/apps/common/js/jquery/aacom/plugins/aaFooterAds.js: -------------------------------------------------------------------------------- 1 | jQuery.aaFooterAds=function(source){var self=this;self.init=function(){jQuery(source).each(function(i,item){adLink=jQuery("#"+item.id+" a");if(item.isFlash){if(!jQuery.flash.available){adLink.append(''+item.altText+'');}else{jQuery(adLink).flash({swf:item.flashSrc,height:item.height,width:item.width,expressInstall:true});}}adLink.attr("title",item.altText);if(item.target.indexOf("http")!=-1){temp=function(){captureExtClickThru(item.target,item.anchorLocation,item.altText,item.repositoryName,item.repositoryId,item.locale,item.isFlash);};item.isFlash?adLink.mouseup(temp):adLink.click(temp);}if(item.openInNewWin=="Y"){temp=function(){window.open(this.href,"","scrollbars=yes,toolbar=yes,resizable=yes,status=yes,location=no,menubar=no,width=700,height=480,top=1,left=385");return false;};item.isFlash?adLink.mouseup(temp):adLink.click(temp);}else{if(item.isFlash){adLink.mouseup(function(){location.href=this.href;});}}});};self.init();}; -------------------------------------------------------------------------------- /miniwob/html/flight/AA/apps/common/js/jquery/aacom/plugins/aaTextBoxMessage.js: -------------------------------------------------------------------------------- 1 | function aaTextBoxMessage(paramElement,paramMessage){if(paramElement){this.element=paramElement;this.message=((paramMessage)?paramMessage.replace(/^\s+|\s+$/g,""):"aaTextBoxMessage - ATTENTION: caption has not been defined");this.element.aaTextBoxMessage=this;this.element.value=this.message;this.element.onfocus=aaTextBoxMessage.onfocus;this.element.onblur=aaTextBoxMessage.onblur;this.element.aaTextBoxMessage=this;}}aaTextBoxMessage.onfocus=function(){if(this.value.replace(/^\s+|\s+$/g,"")===this.aaTextBoxMessage.message){this.value="";}};aaTextBoxMessage.onblur=function(){if(this.value.replace(/^\s+|\s+$/g,"")===""){this.value=this.aaTextBoxMessage.message;}};jQuery.fn.aaTextBoxMessage=function(paramMessage){var i=0;var obj;for(i;i<\/script>");}}catch(err){}delete_VPNR=createVPNR();delete_VPNR.initDeleteVPNRModal();});createVPNR=function(){var delete_VPNR={aaUtil_delete_VPNR:new aa_Utilities(),btns:[{name:vpnr_okMessage,callback:function forwardLogin(){deleteVirtualPNR();var url=jQuery("#loginURL").val();window.location=url;},cssClass:"btn",closeDialog:true},{name:vpnr_cancelMessage,cssClass:"btn btn-secondary",closeDialog:true}],deleteVPNRModal:function(){var VPNR=jQuery("#virtualPNR").val(),status=jQuery("#status").val();if(VPNR=="true"&&status!="Purchased"){this.aaUtil_delete_VPNR.aaDialog("#modal_deleteVPNRModal").openDialog(jQuery("#loginLogoutLink"));jQuery(window).scrollTop(0);}else{var url=jQuery("#loginURL").val();window.location=url;}},initDeleteVPNRModal:function(){this.aaUtil_delete_VPNR.aaDialog("#modal_deleteVPNRModal",{width:"small",buttons:this.btns,toggleScroll:true});}};return delete_VPNR;};function deleteVPNRModal(){delete_VPNR.deleteVPNRModal();} -------------------------------------------------------------------------------- /miniwob/html/flight/AA/js/aa/common/aacom-ui-1.0.0.js: -------------------------------------------------------------------------------- 1 | function AAcom(){var args=Array.prototype.slice.call(arguments),callback=args.pop(),modules=(args[0]&&typeof args[0]==="string")?args:args[0],i;if(!(this instanceof AAcom)){return new AAcom(modules,callback);}if(!modules||modules=="*"){modules=[];for(i in AAcom.modules){if(AAcom.modules.hasOwnProperty(i)){modules.push(i);}}}for(i=0;i0){details={url:$form.attr("action"),type:$form.attr("method"),data:(options.dataType==="json")?$form.serializeObject():$form.serialize()};}return details;};var _errorHandler=function(xhr,statusText,settings){if(statusText!=="success"){if(settings.onError!==undefined){settings.onError(xhr,statusText);}else{var $htmlResponse=$j(xhr.responseText);if(statusText==="timeout"||xhr.responseText==="invalidState"||$htmlResponse.find(".js-invalidState").length>0){top.location.href="/invalidState.do";return true;}else{if(statusText==="error"||xhr.responseText==="systemError"||$htmlResponse.find(".js-systemError").length>0){top.location.href="/systemError.do";return true;}}}}return false;};};if(!$j.isFunction($j.fn.serializeObject)){$j.fn.serializeObject=function(){var o={};var a=this.serializeArray();$j.each(a,function(){if(o[this.name]){if(!o[this.name].push){o[this.name]=[o[this.name]];}o[this.name].push(this.value||"");}else{o[this.name]=this.value||"";}});return o;};} -------------------------------------------------------------------------------- /miniwob/html/flight/AA/js/aa/modules/browserdetect.js: -------------------------------------------------------------------------------- 1 | AAcom.modules.browserdetect=function(AAUI){var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";},searchString:function(data){for(var i=0;i-1)&&(agentStr.indexOf("MSIE 7.0")>-1))||((agentStr.indexOf("Trident/5.0")>-1)&&(agentStr.indexOf("MSIE 7.0")>-1))||((agentStr.indexOf("Trident/4.0")>-1)&&(agentStr.indexOf("MSIE 7.0")>-1))){return true;}}return false;};}; -------------------------------------------------------------------------------- /miniwob/html/flight/AA/js/aa/modules/commonsetup.js: -------------------------------------------------------------------------------- 1 | AAcom.modules.commonsetup=function(AAUI){/* NOT NEEDED */}; 2 | -------------------------------------------------------------------------------- /miniwob/html/flight/AA/js/aa/plugins/noBounce.js: -------------------------------------------------------------------------------- 1 | var noBounce=function(){var module={};var settings={animate:true};var track=[];var velocity={x:0,y:0};var vector={subtraction:function(v1,v2){return{x:v1.x-v2.x,y:v1.y-v2.y};},length:function(v){return Math.sqrt((v.x*v.x)+(v.y*v.y));},unit:function(v){var length=vector.length(v);v.x/=length;v.y/=length;},skalarMult:function(v,s){v.x*=s;v.y*=s;}};var requestAnimFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60);};})();function handleTouchStart(evt){var point,touch;touch=evt.changedTouches[0];point={x:touch.clientX,y:touch.clientY,timeStamp:evt.timeStamp};track=[point];}function handleTouchMove(evt){var point,touch;evt.preventDefault();touch=evt.changedTouches[0];point={x:touch.clientX,y:touch.clientY,timeStamp:evt.timeStamp};track.push(point);doScroll();}function handleTouchEnd(evt){if(track.length>2&&settings.animate){velocity=calcVelocity();requestAnimFrame(animate);}}function calcVelocity(){var p1,p2,v,timeDiff,length;p1=track[0];p2=track[track.length-1];timeDiff=p2.timeStamp-p1.timeStamp;v=vector.subtraction(p2,p1);length=vector.length(v);vector.unit(v);vector.skalarMult(v,length/timeDiff*20);return v;}function doScroll(){var p1,p2,x,y;if(track.length>1){p1=track[track.length-1];p2=track[track.length-2];x=p2.x-p1.x;y=p2.y-p1.y;requestAnimFrame(function(){window.scrollBy(x,y);});}}function animate(){scrollBy(-velocity.x,-velocity.y);vector.skalarMult(velocity,0.95);if(vector.length(velocity)>0.2){requestAnimFrame(animate);}}function isElement(o){return(typeof HTMLElement==="object"?o instanceof HTMLElement:o&&typeof o==="object"&&o!==null&&o.nodeType===1&&typeof o.nodeName==="string");}module.init=function(options){if(typeof options.animate==="boolean"){settings.animate=options.animate;}if(isElement(options.element)){settings.element=options.element;}var element=settings.element||document;element.addEventListener("touchstart",handleTouchStart);element.addEventListener("touchmove",handleTouchMove);element.addEventListener("touchend",handleTouchEnd);element.addEventListener("touchcancel",handleTouchEnd);element.addEventListener("touchleave",handleTouchEnd);};return module;}(); -------------------------------------------------------------------------------- /miniwob/html/flight/AA/js/libs/jquery/ui/1.10/i18n/jquery.ui.datepicker-en-aa.js: -------------------------------------------------------------------------------- 1 | /* Initialization in US English (customized for AA.com) for the datepicker from jQuery UI */ 2 | /* This file should be referred last in the JSP header so US English will be the default */ 3 | /* Ricardo Viana */ 4 | jQuery(function($){ 5 | $.datepicker.regional['en'] = { 6 | closeText: 'Close', 7 | prevText: 'Prev', 8 | nextText: 'Next', 9 | currentText: 'Today', 10 | monthNames: ['January','February','March','April','May','June', 11 | 'July','August','September','October','November','December'], 12 | monthNamesShort: ['Jan','Feb','Mar','Apr','May','Jun', 13 | 'Jul','Aug','Sep','Oct','Nov','Dec'], 14 | dayNames: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], 15 | dayNamesShort: ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'], 16 | dayNamesMin: ['S', 'M', 'T', 'W', 'T', 'F', 'S'], 17 | weekHeader: 'Wk', 18 | dateFormat: 'mm/dd/yy', 19 | firstDay: 0, 20 | isRTL: false, 21 | showMonthAfterYear: false, 22 | yearSuffix: ''}; 23 | $.datepicker.setDefaults($.datepicker.regional['en']); 24 | }); 25 | -------------------------------------------------------------------------------- /miniwob/html/flight/AA/surrogate/airportLookup.js: -------------------------------------------------------------------------------- 1 | // Surrogate autocomplete 2 | 3 | /* 4 | Called by: apps/common/js/jquery/aacom/plugins/aaAirportAutoComplete.js 5 | 6 | Important args: 7 | - input.data.searchText: search term 8 | - input.success: callback 9 | 10 | Response examples: home/ajax/airportLookup_* 11 | [{"name":"Baltimore Washington International Airport","code":"BWI","stateCode":"MD","countryCode":"US","countryName":"United States"},...] 12 | */ 13 | $miniwob.surrogateAutocomplete = function (input) { 14 | function match() { 15 | var query = input.data.searchText.toLowerCase().replace(/[^a-z0-9]/, ''); 16 | var results = $miniwob.airports.filter(function (item) { 17 | return (item.code.toLowerCase().includes(query)); 18 | }); 19 | if (!results.length) { 20 | results = $miniwob.airports.filter(function (item) { 21 | var name = (item.name + item.stateCode).toLowerCase().replace(/[^a-z0-9]/, ''); 22 | return name.includes(query); 23 | }); 24 | } 25 | input.success(results); 26 | } 27 | 28 | if (!$miniwob.airports) { 29 | var xhr = new XMLHttpRequest(); 30 | xhr.onreadystatechange = function () { 31 | if (xhr.readyState == 4) { 32 | if (xhr.status == 200) { 33 | $miniwob.airports = JSON.parse(xhr.responseText); 34 | match(); 35 | } else { 36 | console.error('Error loading airports.json'); 37 | } 38 | } 39 | }; 40 | xhr.open('GET', 'surrogate/airports.json'); 41 | xhr.send(); 42 | } else { 43 | match(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /miniwob/html/flight/AA/wrapper.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AA 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 27 | 28 | 29 | 30 |
31 |
(Instruction)
32 |
(Raw query)
33 |
(Reward reason)
34 |
35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/aura.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/aura.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/cal3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/cal3.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/chkboxes3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/chkboxes3.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/clear_text2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/clear_text2.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/collapse.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/expand.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/flight_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/flight_arrow.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/geo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/geo.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/home.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/info2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/info2.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/leftright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/leftright.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/logo2.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/logos/AA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/logos/AA.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/logos/AS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/logos/AS.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/logos/DL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/logos/DL.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/images/logos/VX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/images/logos/VX.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/stylesheets/circular/ASCircularWeb-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/stylesheets/circular/ASCircularWeb-Bold.woff -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/stylesheets/circular/ASCircularWeb-Book.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto-medium/stylesheets/circular/ASCircularWeb-Book.woff -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto-medium/surrogate/airportLookup.js: -------------------------------------------------------------------------------- 1 | // Surrogate autocomplete 2 | 3 | /* 4 | Called by: scripts/main.js 5 | 6 | Important args: 7 | - prefix 8 | - callback 9 | 10 | The response only contains at most 5 entries. 11 | 12 | Response examples: 13 | ["Adak Island, AK (ADK-Adak Island)", "Alexandria, LA (AEX-Alexandria Intl.)", "Brownsville, TX (BRO-South Padre Island Intl.)", "Cleveland, OH (CLE-Hopkins Intl.)", "Grand Forks, ND (GFK-Grand Forks Intl.)"] 14 | 15 | The cache only contains a partial list of possible airports. Will just use that. 16 | */ 17 | $miniwob.surrogateAutocomplete = function (prefix, callback) { 18 | function match() { 19 | var query = prefix.toLowerCase().replace(/[^a-z0-9 ]/, ''); 20 | var results = $miniwob.airports.filter(function (item) { 21 | return (item.toLowerCase().replace(/[^a-z0-9 ]/, '').includes(query)); 22 | }); 23 | callback(results.length ? results.slice(0, 5) : null); 24 | } 25 | 26 | if (!$miniwob.airports) { 27 | var xhr = new XMLHttpRequest(); 28 | xhr.onreadystatechange = function () { 29 | if (xhr.readyState == 4) { 30 | if (xhr.status == 200) { 31 | $miniwob.airports = JSON.parse(xhr.responseText); 32 | match(); 33 | } else { 34 | console.error('Error loading airports.json'); 35 | } 36 | } 37 | }; 38 | xhr.open('GET', 'surrogate/airports.json'); 39 | xhr.send(); 40 | } else { 41 | match(); 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/aura.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/aura.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/cal3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/cal3.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/chkboxes3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/chkboxes3.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/clear_text2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/clear_text2.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/collapse.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/expand.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/flight_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/flight_arrow.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/geo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/geo.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/home.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/info2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/info2.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/leftright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/leftright.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/logo2.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/logos/AA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/logos/AA.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/logos/AS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/logos/AS.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/logos/DL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/logos/DL.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/images/logos/VX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/images/logos/VX.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/stylesheets/circular/ASCircularWeb-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/stylesheets/circular/ASCircularWeb-Bold.woff -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/stylesheets/circular/ASCircularWeb-Book.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska-auto/stylesheets/circular/ASCircularWeb-Book.woff -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska-auto/surrogate/airportLookup.js: -------------------------------------------------------------------------------- 1 | // Surrogate autocomplete 2 | 3 | /* 4 | Called by: scripts/main.js 5 | 6 | Important args: 7 | - prefix 8 | - callback 9 | 10 | The response only contains at most 5 entries. 11 | 12 | Response examples: 13 | ["Adak Island, AK (ADK-Adak Island)", "Alexandria, LA (AEX-Alexandria Intl.)", "Brownsville, TX (BRO-South Padre Island Intl.)", "Cleveland, OH (CLE-Hopkins Intl.)", "Grand Forks, ND (GFK-Grand Forks Intl.)"] 14 | 15 | The cache only contains a partial list of possible airports. Will just use that. 16 | */ 17 | $miniwob.surrogateAutocomplete = function (prefix, callback) { 18 | function match() { 19 | var query = prefix.toLowerCase().replace(/[^a-z0-9 ]/, ''); 20 | var results = $miniwob.airports.filter(function (item) { 21 | return (item.toLowerCase().replace(/[^a-z0-9 ]/, '').includes(query)); 22 | }); 23 | callback(results.length ? results.slice(0, 5) : null); 24 | } 25 | 26 | if (!$miniwob.airports) { 27 | var xhr = new XMLHttpRequest(); 28 | xhr.onreadystatechange = function () { 29 | if (xhr.readyState == 4) { 30 | if (xhr.status == 200) { 31 | $miniwob.airports = JSON.parse(xhr.responseText); 32 | match(); 33 | } else { 34 | console.error('Error loading airports.json'); 35 | } 36 | } 37 | }; 38 | xhr.open('GET', 'surrogate/airports.json'); 39 | xhr.send(); 40 | } else { 41 | match(); 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/aura.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/aura.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/cal3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/cal3.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/chkboxes3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/chkboxes3.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/clear_text2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/clear_text2.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/collapse.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/expand.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/flight_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/flight_arrow.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/geo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/geo.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/home.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/info2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/info2.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/leftright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/leftright.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/logo2.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/logos/AA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/logos/AA.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/logos/AS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/logos/AS.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/logos/DL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/logos/DL.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/images/logos/VX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/images/logos/VX.png -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/stylesheets/circular/ASCircularWeb-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/stylesheets/circular/ASCircularWeb-Bold.woff -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/stylesheets/circular/ASCircularWeb-Book.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwob/html/flight/Alaska/stylesheets/circular/ASCircularWeb-Book.woff -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/surrogate/airportLookup.js: -------------------------------------------------------------------------------- 1 | // Surrogate autocomplete 2 | 3 | /* 4 | Called by: scripts/main.js 5 | 6 | Important args: 7 | - prefix 8 | - callback 9 | 10 | The response only contains at most 5 entries. 11 | 12 | Response examples: 13 | ["Adak Island, AK (ADK-Adak Island)", "Alexandria, LA (AEX-Alexandria Intl.)", "Brownsville, TX (BRO-South Padre Island Intl.)", "Cleveland, OH (CLE-Hopkins Intl.)", "Grand Forks, ND (GFK-Grand Forks Intl.)"] 14 | 15 | The cache only contains a partial list of possible airports. Will just use that. 16 | */ 17 | $miniwob.surrogateAutocomplete = function (prefix, callback) { 18 | function match() { 19 | var query = prefix.toLowerCase().replace(/[^a-z0-9 ]/, ''); 20 | var results = $miniwob.airports.filter(function (item) { 21 | return (item.toLowerCase().replace(/[^a-z0-9 ]/, '').includes(query)); 22 | }); 23 | callback(results.length ? results.slice(0, 5) : null); 24 | } 25 | 26 | if (!$miniwob.airports) { 27 | var xhr = new XMLHttpRequest(); 28 | xhr.onreadystatechange = function () { 29 | if (xhr.readyState == 4) { 30 | if (xhr.status == 200) { 31 | $miniwob.airports = JSON.parse(xhr.responseText); 32 | match(); 33 | } else { 34 | console.error('Error loading airports.json'); 35 | } 36 | } 37 | }; 38 | xhr.open('GET', 'surrogate/airports.json'); 39 | xhr.send(); 40 | } else { 41 | match(); 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /miniwob/html/flight/Alaska/wrapper.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Alaska 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 27 | 28 | 29 | 30 |
31 |
(Instruction)
32 |
(Raw query)
33 |
(Reward reason)
34 |
35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /miniwob/html/flight/flight-common/wrapper.css: -------------------------------------------------------------------------------- 1 | /* ################ SIZING ################ */ 2 | 3 | #wrap, #sync-task-cover { 4 | height: 667px; 5 | width: 375px; 6 | } 7 | 8 | #wrap { 9 | overflow-x: auto; 10 | overflow-y: auto; 11 | border: 0; 12 | } 13 | 14 | #click-canvas, #reward-display { 15 | left: 380px; 16 | } 17 | 18 | #query-wrap { 19 | position: absolute; 20 | top: 215px; 21 | left: 380px; 22 | width: 160px; 23 | height: auto; 24 | } 25 | #query { 26 | height: auto; 27 | } 28 | #query-pretty { 29 | background-color: #EFF; 30 | font-size: 12px; 31 | padding: 3px; 32 | } 33 | #query-pretty .mode { 34 | font-weight: bold; 35 | } 36 | #query-pretty table { 37 | border-collapse: collapse; 38 | } 39 | #query-pretty th, #query-pretty td { 40 | border: 1px solid gray; 41 | padding: 2px 5px; 42 | width: 50%; 43 | text-align: left; 44 | } 45 | #reward-reason { 46 | background-color: #FEF; 47 | font-size: 10px; 48 | padding: 3px; 49 | } 50 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/choose-date-easy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Choose Date Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 51 | 52 | 53 |
54 |
55 |
56 |

Date:

57 |
58 | 59 |
60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/choose-date-medium.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Choose Date Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 51 | 52 | 53 |
54 |
55 |
56 |

Date:

57 |
58 | 59 |
60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/choose-date-nodelay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Choose Date Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 53 | 54 | 55 |
56 |
57 |
58 |

Date:

59 |
60 | 61 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/choose-date.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Choose Date Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 51 | 52 | 53 |
54 |
55 |
56 |

Date:

57 |
58 | 59 |
60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/choose-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Choose List Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 56 | 57 | 58 |
59 |
60 |
61 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-button-sequence.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Button Sqeuence Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 47 | 48 | 49 |
50 |
Click button ONE, then click button TWO.
51 |
52 | 53 | 54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Button Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 67 | 68 | 69 |
70 |
71 |
72 |
73 | 74 | 75 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-checkboxes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Checkboxes Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 65 | 66 | 67 |
68 |
69 |
70 |
71 |
72 | 73 |
74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-collapsible-nodelay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Collapsible Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 56 | 57 | 58 |
59 |
60 |
61 |
62 | 63 | 64 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-collapsible.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Collapsible Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 56 | 57 | 58 |
59 |
60 |
61 |
62 | 63 | 64 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-dialog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Dialog Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 | 25 | 57 | 58 | 59 |
60 |
61 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-link.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Link Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 70 | 71 | 72 |
73 |
74 |
75 |
76 | 77 | 78 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-menu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Menu Task 5 | 6 | 7 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 78 | 79 | 80 |
81 |
82 |
83 |
84 | 85 | 86 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-option.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Option Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 54 | 55 | 56 |
57 |
58 |
59 |
60 |
61 | 62 |
63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-shape.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Shape Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 57 | 58 | 59 |
60 |
61 |
62 | 63 |
64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-tab.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Tab Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 22 | 23 | 79 | 80 | 81 |
82 |
83 |
84 |
85 | 86 | 87 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-test-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Test Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 34 | 35 | 36 |
37 |
Click button ONE.
38 |
39 | 40 | 41 |
42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-test-transfer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Test Transfer Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 44 | 45 | 46 |
47 |
48 |
49 | 50 | 51 |
52 |
53 | 54 | 55 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Test Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 31 | 32 | 33 |
34 |
Click the button.
35 |
36 | 37 |
38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/click-widget.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Widget Task 5 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 69 | 70 | 71 |
72 |
73 |
74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/drag-cube.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Drag Cube Task 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 45 | 46 | 47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
1
55 |
56 |
57 |
2
58 |
59 |
60 |
3
61 |
62 |
63 |
4
64 |
65 |
66 |
5
67 |
68 |
69 |
6
70 |
71 |
72 |
73 | 74 |
75 |
76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/enter-date.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enter Date Task 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 45 | 46 | 47 |
48 |
49 |
50 |
51 | 52 | 53 |
54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/enter-password.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enter Password Task 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 | 42 |
43 |
44 |
45 |
46 |

47 |

48 | 49 |
50 |
51 |
52 | 53 | 54 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/enter-text-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enter Text Task 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 66 | 67 | 68 |
69 |
70 |
71 |
72 | 73 | 74 |
75 |
76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/enter-text-dynamic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enter Dynamic Text Task 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 45 | 46 | 47 |
48 |
49 |
50 |
51 | 52 | 53 |
54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/enter-text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enter Text Task 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 47 | 48 | 49 |
50 |
51 |
52 |
53 | 54 | 55 |
56 |
57 |
58 | 59 | 60 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/enter-time.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enter Time Task 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 44 | 45 | 46 |
47 |
48 |
49 |
50 | 51 | 52 |
53 |
54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/focus-text-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Focus Text Task 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 49 | 50 | 51 |
52 |
53 |
54 | 55 | 56 | 57 |
58 |
59 | 60 | 61 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/focus-text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Focus Text Task 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 44 | 45 | 46 |
47 |
48 |
49 | 50 |
51 |
52 | 53 | 54 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/guess-number.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Resize Textarea Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 18 | 19 | 60 | 61 | 62 |
63 |
Guess the number between 0-9 and press Submit. Use the feedback below to find the right number.
64 |
65 |
66 |
Waiting for your guess...
67 |
Correct!
68 |
The number is lower than .
69 |
The number is higher than .
70 |
71 |
72 | 73 | 74 |
75 |
76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/highlight-text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Highlight Text Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 65 | 66 | 67 |
68 |
69 |
70 |
71 | 72 | 73 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/login-user.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Login User Task 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 39 | 40 | 41 |
42 |
43 |
44 |
45 |

46 |

47 | 48 |
49 |
50 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/scroll-text-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Scroll Text Task 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 59 | 60 | 61 |
62 |
63 |
64 | 65 | 66 |
67 |
68 | 69 | 70 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/scroll-text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Scroll Text Task 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 46 | 47 | 48 |
49 |
50 |
51 | 52 | 53 | 54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/simple-algebra.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Simple Algebra Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 19 | 20 | 60 | 61 | 62 |
63 |
Solve for x and type your answer into the textbox. Press Submit when done.
64 |
65 |
66 |
67 | x = 68 | 69 |
70 | 71 |
72 |
73 | 74 | 75 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/simple-arithmetic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Simple Math Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 19 | 20 | 56 | 57 | 58 |
59 |
Solve the math problem and type your answer into the textbox. Press submit when done.
60 |
61 |
62 |
63 | 64 |
65 | 66 |
67 |
68 | 69 | 70 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/text-transform.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Text Transform Task 5 | 6 | 7 | 8 | 14 | 15 | 16 | 17 | 18 | 19 | 64 | 65 | 66 |
67 |
Type the text below into the text field and press Submit.
68 |
69 |
70 |
71 | 72 | 73 |
74 |
75 |
76 | 77 | 78 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/unicode-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Click Button Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 67 | 68 | 69 |
70 |
71 |
72 |
73 | 74 | 75 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/use-autocomplete-nodelay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Use Autocomplete Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 22 | 23 | 69 | 70 | 71 |
72 |
73 |
74 | 75 | 76 | 77 |
78 |
79 | 80 | 81 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/use-autocomplete.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Use Autocomplete Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 22 | 23 | 68 | 69 | 70 |
71 |
72 |
73 | 74 | 75 | 76 |
77 |
78 | 79 | 80 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/use-colorwheel-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Use Color Wheel Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 19 | 20 | 54 | 55 | 56 |
57 |
58 |
59 | Color:
60 | 61 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/use-colorwheel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Use Color Wheel Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 45 | 46 | 47 |
48 |
49 |
50 | Color:
51 | 52 |
53 |
54 | 55 | 56 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/use-slider.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Use Slider Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 60 | 61 | 62 |
63 |
64 |
65 |
66 |
0
67 | 68 |
69 |
70 | 71 | 72 | -------------------------------------------------------------------------------- /miniwob/html/miniwob/use-spinner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Use Spinner Task 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 46 | 47 | 48 |
49 |
50 |
51 | 52 | 53 | 54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /miniwob/http_server.py: -------------------------------------------------------------------------------- 1 | """HTTP server for serving environment HTMLs.""" 2 | import functools 3 | from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer 4 | from threading import Thread 5 | 6 | 7 | SERVER_SINGLETON = None 8 | 9 | 10 | def start_http_server(html_dir: str): 11 | """Returns an HTTP server for serving environment HTMLs. 12 | 13 | Args: 14 | html_dir: Path to the html/ directory. 15 | 16 | Returns: 17 | Base URL that looks like "http://localhost:[port]/". 18 | """ 19 | global SERVER_SINGLETON 20 | if SERVER_SINGLETON: 21 | httpd = SERVER_SINGLETON 22 | else: 23 | httpd = ThreadingHTTPServer( 24 | ("localhost", 0), 25 | functools.partial(SimpleHTTPRequestHandler, directory=html_dir), 26 | ) 27 | 28 | def serve_forever(server): 29 | with server: 30 | server.serve_forever() 31 | 32 | thread = Thread(target=serve_forever, args=(httpd,)) 33 | thread.daemon = True 34 | thread.start() 35 | SERVER_SINGLETON = httpd 36 | address, port = httpd.server_address 37 | return f"http://{address}:{port}/" 38 | -------------------------------------------------------------------------------- /miniwob/reward.py: -------------------------------------------------------------------------------- 1 | """Reward processors. 2 | 3 | Each method takes the metadata with the following keys: 4 | - env_reward: MiniWoB official reward 5 | - raw_reward: Raw task reward without time penalty 6 | - done: Whether the task is done 7 | Then it returns a reward (float). 8 | """ 9 | from typing import Any, Callable, Mapping 10 | 11 | 12 | Metadata = Mapping[str, Any] 13 | RewardProcessor = Callable[[Metadata], float] 14 | 15 | 16 | def get_original_reward(metadata: Metadata) -> float: 17 | """Returns the original reward. 18 | 19 | This is the reward as defined in the environment. In all environments, 20 | any positive reward is scaled by the remaining time. Some environments 21 | also give partial rewards. See the documentation or docstring of each 22 | environment for details. 23 | 24 | The returned value is 0.0 if the episode has not terminated yet, 25 | and a value between -1.0 and 1.0 (inclusive) otherwise. 26 | """ 27 | return float(metadata["env_reward"]) 28 | 29 | 30 | def get_raw_reward(metadata: Metadata) -> float: 31 | """Returns the raw reward without time penalty. 32 | 33 | Some environments give partial rewards. See the documentation or docstring 34 | of each environment for details. 35 | 36 | The returned value is 0.0 if the episode has not terminated yet, 37 | and a value between -1.0 and 1.0 (inclusive) otherwise. 38 | """ 39 | return float(metadata["raw_reward"]) 40 | 41 | 42 | def get_binary_reward(metadata: Metadata) -> float: 43 | """Returns the binary reward without time penalty or partial reward. 44 | 45 | The returned value is 0.0 if the episode has not terminated yet, 46 | and either -1.0 or 1.0 otherwise. 47 | """ 48 | if not metadata["done"]: 49 | return 0.0 50 | return 1.0 if metadata["raw_reward"] == 1.0 else -1.0 51 | 52 | 53 | def get_thresholded_reward(metadata: Metadata, threshold: float = 1.0) -> float: 54 | """Returns the binary reward where raw reward >= threshold is treated as 1.0. 55 | 56 | This is needed for tasks that give continuous-valued partial rewards 57 | depending on how close the answer is to the correct answer. 58 | 59 | To specify this method as the reward processor, use 60 | `lambda metadata: get_thresholded_reward(metadata, threshold=VALUE)` 61 | or `functools.partial(get_thresholded_reward, threshold=VALUE)`. 62 | 63 | The returned value is 0.0 if the episode has not terminated yet, 64 | and either -1.0 or 1.0 otherwise. 65 | """ 66 | if not metadata["done"]: 67 | return 0.0 68 | return 1.0 if metadata["raw_reward"] >= threshold else -1.0 69 | -------------------------------------------------------------------------------- /miniwob/spaces.py: -------------------------------------------------------------------------------- 1 | """Custom spaces for MiniWoB++.""" 2 | from typing import Any 3 | 4 | import numpy as np 5 | from gymnasium.spaces import Box, Text 6 | from gymnasium.spaces.utils import flatdim, flatten, flatten_space, unflatten 7 | from numpy.typing import NDArray 8 | 9 | 10 | MAX_UNICODE_CODEPOINT = 0x10FFFF 11 | 12 | 13 | class Unicode(Text): 14 | """A space representing a unicode string. 15 | 16 | Unicode is a replacement for the Text space in Gymnasium, with the 17 | following differences: 18 | 19 | - Each character can be an arbitrary unicode character. 20 | - The sample method samples from the specified character set. 21 | """ 22 | 23 | def contains(self, x: Any) -> bool: 24 | """Return boolean specifying if x is a valid member of this space.""" 25 | # Do not check the character set. 26 | return isinstance(x, str) and self.min_length <= len(x) <= self.max_length 27 | 28 | def __repr__(self) -> str: 29 | """Gives a string representation of this space.""" 30 | return f"Unicode({self.min_length}, {self.max_length})" 31 | 32 | def __eq__(self, other: Any) -> bool: 33 | """Check whether ``other`` is equivalent to this instance.""" 34 | return ( 35 | isinstance(other, Unicode) 36 | and self.min_length == other.min_length 37 | and self.max_length == other.max_length 38 | ) 39 | 40 | 41 | @flatdim.register(Unicode) 42 | def _flatdim_unicode(space: Unicode) -> int: 43 | return space.max_length 44 | 45 | 46 | @flatten.register(Unicode) 47 | def _flatten_unicode(space: Unicode, x: str) -> NDArray[np.int32]: 48 | arr = np.full(shape=(space.max_length,), fill_value=0, dtype=np.int32) 49 | for i, val in enumerate(x): 50 | arr[i] = ord(val) 51 | return arr 52 | 53 | 54 | @unflatten.register(Unicode) 55 | def _unflatten_unicode(space: Unicode, x: NDArray[np.int32]) -> str: 56 | return "".join(chr(val) for val in x if val) 57 | 58 | 59 | @flatten_space.register(Unicode) 60 | def _flatten_space_unicode(space: Unicode) -> Box: 61 | return Box( 62 | low=0, high=MAX_UNICODE_CODEPOINT, shape=(space.max_length,), dtype=np.int32 63 | ) 64 | -------------------------------------------------------------------------------- /miniwobplusplus-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Farama-Foundation/miniwob-plusplus/ae877b946e3b92ce55372391af11de491a0f2f9b/miniwobplusplus-text.png -------------------------------------------------------------------------------- /py.Dockerfile: -------------------------------------------------------------------------------- 1 | # A Dockerfile that sets up a full Gym install with test dependencies 2 | ARG PYTHON_VERSION 3 | FROM python:$PYTHON_VERSION 4 | # TODO: Maybe use a Selenium docker? 5 | 6 | SHELL ["/bin/bash", "-o", "pipefail", "-c"] 7 | 8 | RUN apt-get -y update 9 | RUN apt-get install -y chromium chromium-driver 10 | 11 | COPY . /usr/local/miniwob-plusplus/ 12 | WORKDIR /usr/local/miniwob-plusplus/ 13 | RUN pip install -e .[testing] --no-cache-dir 14 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | """Setups the project.""" 2 | 3 | import pathlib 4 | 5 | from setuptools import setup 6 | 7 | 8 | CWD = pathlib.Path(__file__).absolute().parent 9 | 10 | 11 | def get_version(): 12 | """Gets the miniwob version.""" 13 | path = CWD / "miniwob" / "__init__.py" 14 | content = path.read_text() 15 | 16 | for line in content.splitlines(): 17 | if line.startswith("__version__"): 18 | return line.strip().split()[-1].strip().strip('"') 19 | raise RuntimeError("bad version data in __init__.py") 20 | 21 | 22 | setup(name="miniwob", version=get_version()) 23 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for MiniWoB++.""" 2 | -------------------------------------------------------------------------------- /tests/test_api.py: -------------------------------------------------------------------------------- 1 | """Test integration with Gymnasium API.""" 2 | import gymnasium 3 | import pytest 4 | from gymnasium import spaces 5 | from gymnasium.utils.env_checker import check_env 6 | from gymnasium.wrappers import FlattenObservation 7 | 8 | from tests.utils import get_all_registered_miniwob_envs 9 | 10 | 11 | class TestGymAPI: 12 | """Test integration with Gymnasium API.""" 13 | 14 | @pytest.fixture(params=get_all_registered_miniwob_envs()) 15 | def env(self, request): 16 | """Yield an environment for the task.""" 17 | env = gymnasium.make(request.param) 18 | yield env 19 | env.close() 20 | 21 | def test_gym_api(self, env): 22 | """Check that the environment follows Gym API.""" 23 | # Run check_env to check space containment, determinism, etc. 24 | check_env(env.unwrapped, skip_render_check=True) 25 | # Check the spaces and flattened spaces. 26 | assert isinstance(env.observation_space, spaces.Dict) 27 | assert set(env.observation_space) == { 28 | "utterance", 29 | "dom_elements", 30 | "screenshot", 31 | "fields", 32 | } 33 | # dom_elements is a Sequence space and cannot be flattened. 34 | # But each element in the Sequence can be flattened. 35 | env = FlattenObservation(env) 36 | assert isinstance(env.observation_space, spaces.Dict) 37 | assert isinstance(env.observation_space["utterance"], spaces.Box) 38 | assert isinstance(env.observation_space["dom_elements"], spaces.Sequence) 39 | assert isinstance(env.observation_space["screenshot"], spaces.Box) 40 | assert isinstance(env.observation_space["fields"], spaces.Sequence) 41 | -------------------------------------------------------------------------------- /tests/test_spaces.py: -------------------------------------------------------------------------------- 1 | """Test the custom spaces.""" 2 | import numpy as np 3 | from gymnasium.spaces import Box, Text 4 | from gymnasium.spaces.utils import flatdim, flatten, flatten_space, unflatten 5 | 6 | from miniwob.spaces import Unicode 7 | 8 | 9 | class TestUnicode: 10 | """Test the Unicode space.""" 11 | 12 | def test_unicode_contains(self): 13 | """Test the `contains` method.""" 14 | space = Unicode(20, min_length=4, charset="abc") 15 | assert space.contains("Hello, World!") 16 | assert space.contains("Привет мир!") 17 | assert space.contains("This has 20 letters.") 18 | assert not space.contains("This is longer than 20 letters.") 19 | assert not space.contains("cab") 20 | 21 | def test_unicode_sample(self): 22 | """Test the `sample` method.""" 23 | space = Unicode(20, min_length=4, charset="abc") 24 | for _ in range(5): 25 | x = space.sample() 26 | assert all(char in "abc" for char in x) 27 | assert 4 <= len(x) <= 20 28 | 29 | def test_unicode_flatten(self): 30 | """Test the flatten utilities for Unicode.""" 31 | space = Unicode(10, min_length=4, charset="abc") 32 | assert flatdim(space) == 10 33 | flattened_space = flatten_space(space) 34 | assert isinstance(flattened_space, Box) 35 | x = "你好世界" 36 | flattened_x = flatten(space, x) 37 | assert np.all(flattened_x == np.array([20320, 22909, 19990, 30028] + [0] * 6)) 38 | assert x == unflatten(space, flattened_x) 39 | 40 | def test_text_flatten(self): 41 | """Test that the space utilities still work with Text.""" 42 | space = Text(10, min_length=4, charset="abc") 43 | assert not space.contains("Hello, world!") 44 | assert flatdim(space) == 10 45 | flattened_space = flatten_space(space) 46 | assert isinstance(flattened_space, Box) 47 | x = "baca" 48 | flattened_x = flatten(space, x) 49 | assert np.all(flattened_x == np.array([1, 0, 2, 0] + [3] * 6)) 50 | assert x == unflatten(space, flattened_x) 51 | -------------------------------------------------------------------------------- /tests/utils.py: -------------------------------------------------------------------------------- 1 | """Test utilities.""" 2 | from typing import Iterable 3 | 4 | import gymnasium 5 | 6 | 7 | def get_all_registered_miniwob_envs() -> Iterable[str]: 8 | """Return the name of all registered MiniWoB environments.""" 9 | envs = [] 10 | for env_id, env_spec in gymnasium.registry.items(): 11 | if env_spec.namespace == "miniwob": 12 | envs.append(env_id) 13 | return sorted(envs) 14 | -------------------------------------------------------------------------------- /viewer/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | } 4 | 5 | #wrapper { 6 | margin: 0; 7 | padding: 0; 8 | position: absolute; 9 | left: 0; 10 | right: 0; 11 | top: 0; 12 | bottom: 0; 13 | display: flex; 14 | flex-flow: row; 15 | } 16 | 17 | #file-column { 18 | padding: 10px 20px; 19 | background-color: #EEE; 20 | overflow: auto; 21 | flex-shrink: 0; 22 | } 23 | #file-column > h1 { 24 | font-size: 120%; 25 | } 26 | #file-column > ul { 27 | padding: 0; 28 | } 29 | #file-column > ul > li { 30 | list-style-type: none; 31 | line-height: 1.5; 32 | cursor: pointer; 33 | color: #229; 34 | } 35 | #file-column li.selected { 36 | font-weight: bold; 37 | color: #922; 38 | } 39 | #file-column li:hover { 40 | color: #922; 41 | } 42 | 43 | #display-column { 44 | flex-grow: 1; 45 | display: flex; 46 | flex-flow: column; 47 | } 48 | #display-metadata { 49 | padding: 10px; 50 | } 51 | #display-metadata.success > table { 52 | background-color: #EFE; 53 | } 54 | #display-metadata.fail > table { 55 | background-color: #FEE; 56 | } 57 | #display-episode { 58 | overflow: auto; 59 | padding: 10px; 60 | } 61 | #display-column .metadata { 62 | background-color: white; 63 | margin: 10px 0; 64 | } 65 | #display-column .metadata th { 66 | text-align: right; 67 | padding: 2px 5px; 68 | } 69 | #display-column .metadata td { 70 | padding: 2px 5px; 71 | } 72 | #display-column .state-wrapper { 73 | float: left; 74 | margin: 10px; 75 | padding: 10px; 76 | border-radius: 3px; 77 | border: 1px solid #ccc; 78 | background-color: #eee; 79 | } 80 | #display-column .screen-wrapper { 81 | position: relative; 82 | margin: 10px; 83 | } 84 | #display-column canvas { 85 | } 86 | #display-column img { 87 | position: absolute; 88 | left: 0; 89 | top: 0; 90 | width: 100%; 91 | display: none; 92 | } 93 | #display-column.show-images img { 94 | display: block; 95 | } 96 | -------------------------------------------------------------------------------- /viewer/viewer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Demonstration viewer 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | 19 | 20 | 21 | --------------------------------------------------------------------------------