{"id":27769639,"url":"https://github.com/alexec/web-lang","last_synced_at":"2026-05-04T07:35:14.265Z","repository":{"id":146423384,"uuid":"54784539","full_name":"alexec/web-lang","owner":"alexec","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-23T18:34:27.000Z","size":8343,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-29T20:53:50.701Z","etag":null,"topics":["selenium"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-03-26T15:10:17.000Z","updated_at":"2017-02-22T21:16:49.000Z","dependencies_parsed_at":"2024-07-20T22:45:54.718Z","dependency_job_id":null,"html_url":"https://github.com/alexec/web-lang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexec/web-lang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexec%2Fweb-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexec%2Fweb-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexec%2Fweb-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexec%2Fweb-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexec","download_url":"https://codeload.github.com/alexec/web-lang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexec%2Fweb-lang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32599264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["selenium"],"created_at":"2025-04-29T20:53:49.219Z","updated_at":"2026-05-04T07:35:14.259Z","avatar_url":"https://github.com/alexec.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/alexec/web-lang.svg?branch=master)](https://travis-ci.org/alexec/web-lang)\n# Web Application Testing Lang\n\nA domain specific language for automating and testing web applications.\n\n## Build\n\nTo build this:\n\n~~~shell\nmvn install\n~~~\n\n## Command Line Usage\n\nYou need to create journey files, for example:\n\n~~~ruby\nJourney: \"Searching on Google\"\n\n    # the standard Google search\n\n    go to \"http://www.google.com\"\n    click on \"input[name=q]\"\n    type \"Cheese!\" into \"input[name=q]\"\n    submit\n    title should be \"Cheese! - Google Search\"\n    text of \"input[name=q]\" should be \"Cheese!\"\n~~~\n\nThen, to run this test:\n\n~~~shell\n~/web-lang $ java -Dwl.path=google-search.journey -jar ~/.m2/repository/web-lang/web-lang/1.0.0-SNAPSHOT/web-lang-1.0.0-SNAPSHOT-jar-with-dependencies.jar\nJourney: Searching on Google\n\tgo to \"http://www.google.com\" ... PASS\n\tclick on \"input[name='q']\" ... PASS\n\ttype \"Cheese!\" into \"input[name='q']\" ... PASS\n\tsubmit ... PASS\n\ttitle should be \"Cheese! - Google Search\" ... PASS\n\ttext of \"input[name='q']\" should be \"Cheese!\" ... PASS\n~~~\n\nIf you want to use another browser add these options:\n\n~~~\n-Dwebdriver.chrome.driver=/path/to/chromedriver -Dwl.browser=chrome\n~~~\n\n~~~\n-Dwebdriver.gecko.driver=/path/to/geckodriver -Dwl.browser=firefox\n~~~\n\nThe **root path** can be set using `wl.root`, and they URLs can be relative to that path:\n\n~~~\n-Dwl.root=http://localhost:8080\n~~~\n\n~~~shell\n    go to \"/search\" \n~~~\n\n\n**Page Objects** are a first-class concept, the above journey could be written as follows:\n\n~~~ruby\nPage: \"Search\"\n\n    url is \"http://www.google.com\"\n\n    # you can define elements that are on the page for resuse\n\n    element \"query\" is \"input[name='q']\"\n\nPage: \"Results\"\n\n    # you can have rules that are used to check the page is what you expect\n\n    title should contain \"Google Search\"\n\nJourney: \"Searching on Google\"\n\n    go to \"Search\"\n    # if a selector starts with \"@\" then it is an alias to an element on the current page\n    click on \"@query\"\n    type \"Cheese!\" into \"@query\"\n    submit\n    # this checks the pages is the page you expect\n    page should be \"Results\"\n    title should be \"Cheese! - Google Search\"\n    text of \"@query\" should be \"Cheese!\"\n~~~\n\nIf you only want to run some journeys:\n\n~~~ruby\nmvn test-compile failsafe:integration-test failsafe:verify -Dwl.journey=radio\n~~~\n\n# Examples\n\n| Example                                                                                          | Description                                             |\n|--------------------------------------------------------------------------------------------------|---------------------------------------------------------|\n| `capture to \"filename.png\"`                                                                      | Capture a screenshot                                    |\n| `attribute \"id\" of \"#footer\" should be \"footer\"`                                                 | Check an attribute's value.                             |\n| `check \"input[type='checkbox']:nth-of-type(1)\"`                                                  | Make sure a check-box is checked.                       |\n| `\"input[type='checkbox']:nth-of-type(1)\" should be checked`                                      | Verify a check-box .                                    |\n| `uncheck \"input[type='checkbox']:nth-of-type(2)\"`                                                | Make sure a check-box is not checked.                   |\n| `\"input[type='checkbox']:nth-of-type(2)\" should not be checked`                                  | Verify that a check-box is not checked.                 |\n| `click on \"input[type='radio'][value='No']\" \"#radioId\" should be checked`                        | Check a radio-button, then make sure it was checked.    |\n| `select \"Olives\" in \"select[name='ingredients[]']\"`                                              | Select a list option.                                   |\n| `attribute \"selected\" of \"select[name='ingredients[]'] option[value='Olives']\" should be \"true\"` | Make sure a option is selected.                         |\n| `execute script \"alert('hello');\"`                                                               | Execute JavaScript.                                     |\n| `switch to frame \"frame-top\"`                                                                    | Switch to a frame by name.                              |\n| `switch to frame 0`                                                                              | Switch to a frame based on index.                       |\n| `switch to default content`                                                                      | Switch back to default content after switch to a frame. |\n| `dismiss alert`                                                                                  | Dismiss an alert.                                       |\n| `page should be \"page\"`                                                                          | Page should match.                                      |\n| `text of \"p\" should be \"text\"`                                                                   | Text should be equal.                                   |\n| `text of \"p\" should match \"regexp\"`                                                              | Text should be match.                                   |\n\nYou can find more examples under [src/test/resources/it](src/test/resources/it).\n\n## Selectors\n\nBy default, selectors are CSS (as these are fast and versatile). If you want to use a specific selector:\n\n| Example               | As CSS             | Description           |\n|-----------------------|--------------------|-----------------------|\n| `id:foo`              | `#myId`            | By ID.                |\n| `linkText:foo`        | -                  | By link text.         |\n| `partialLinkText:foo` | -                  | By partial link text. |\n| `name:foo`            | `*[name='foo']`    | By name.              |\n| `tagName:foo`         | `foo`              | By tag name.          |\n| `xpath:foo`           | -                  | By xpath.             |\n| `className:foo`       | `.foo`             | By class name.        |\n| `foo`                 | `foo`              | By CSS, no prefix.    |\n\n## Java Usage\n\nTo run tests, you'll need to have a test within your test sources:\n\n~~~java\npackage mytests;\n\n@RunWith(JourneysRunner.class)\npublic class JourneyIT {\n}\n~~~\n\nThis will run journeys in the class path of that class. In the above can it would look in `src/test/resources/mytests`.\n\n\n## Road-map\n\n* Windows.\n* Prompts.\n* Confirm.\n* Multi-select.\n* Tags.\n* Table support. First-class?\n\n## Resources\n\n* https://github.com/sirthias/parboiled/wiki\n* http://www.hascode.com/2014/01/creating-grammar-parsers-in-java-and-scala-with-parboiled/\n* http://www.alexecollins.com/antlr4-and-maven-tutorial/\n* https://github.com/SeleniumHQ/fluent-selenium\n* http://selenide.org\n* http://www.gebish.org\n* http://www.scalatest.org/user_guide/using_selenium\n* https://github.com/cucumber/cucumber-jvm/blob/master/junit/src/main/java/cucumber/runtime/junit/FeatureRunner.java\n* https://github.com/cucumber/cucumber-jvm/blob/20db608a5535850139ba25fcdb9be3ae46991855/junit/src/main/java/cucumber/runtime/junit/ExecutionUnitRunner.java\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexec%2Fweb-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexec%2Fweb-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexec%2Fweb-lang/lists"}