├── javascript ├── .eslintignore ├── .clang-format ├── .gitignore ├── src │ ├── semantic_locators.ts │ ├── gen │ │ └── index.ts │ └── lib │ │ ├── outer.ts │ │ ├── error.ts │ │ ├── parse_locator.ts │ │ ├── semantic_locator.pegjs │ │ ├── accessible_name.ts │ │ ├── batch_cache.ts │ │ ├── attribute.ts │ │ ├── util.ts │ │ ├── semantic_locator.ts │ │ ├── types.ts │ │ ├── table.ts │ │ └── find_by_semantic_locator.ts ├── tsconfig.json ├── README.md ├── test │ └── lib │ │ ├── role_map_test.ts │ │ ├── outer_test.ts │ │ ├── accessible_name_test.ts │ │ ├── parse_locator_test.ts │ │ ├── semantic_locator_test.ts │ │ └── lookup_result_test.ts ├── karma.conf.js ├── wrapper │ └── wrapper.ts ├── DEVELOPING.md ├── package.json └── .eslintrc.json ├── webdriver_ts ├── .eslintignore ├── .clang-format ├── .gitignore ├── jasmine.json ├── tsconfig.json ├── README.md ├── src │ ├── web_drivers.ts │ └── semantic_locators.ts ├── package.json └── .eslintrc.json ├── webdriver_python ├── src │ ├── data │ │ ├── .gitignore │ │ └── __init__.py │ ├── __init__.py │ └── semantic_locators.py ├── .gitignore ├── scripts │ ├── type_check.sh │ ├── lint.sh │ ├── build.sh │ ├── test.sh │ └── publish.sh ├── .pylintrc ├── test │ ├── __init__.py │ └── webdrivers │ │ ├── __init__.py │ │ └── webdrivers.py ├── DEVELOPING.md ├── README.md └── pyproject.toml ├── webdriver_java ├── src │ ├── main │ │ ├── resources │ │ │ └── com │ │ │ │ └── google │ │ │ │ └── semanticlocators │ │ │ │ └── .gitignore │ │ └── java │ │ │ └── com │ │ │ └── google │ │ │ └── semanticlocators │ │ │ └── SemanticLocatorException.java │ └── test │ │ └── java │ │ └── com │ │ └── google │ │ └── semanticlocators │ │ └── WebDrivers.java ├── DEVELOPING.md ├── README.md └── pom.xml ├── docs ├── img │ ├── outer.png │ ├── a11y_tree.png │ ├── wildcard_name.png │ ├── explicit_semantics.png │ ├── native_semantics_link.png │ ├── aria_labelledby_example.png │ ├── native_semantics_button.png │ └── icon_64dp.svg ├── faq.md ├── features.md ├── DEVELOPING.md └── tutorial.md ├── webdriver_go ├── go.mod └── semloc │ ├── semloc.go │ └── semloc_test.go ├── pages ├── index.html └── playground │ └── index.html ├── AUTHORS ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── workflows │ ├── github_pages.yml │ ├── lint_webdriver_java.yml │ ├── test_javascript.yml │ ├── test_webdriver_dotnet.yml │ ├── test_webdriver_java.yml │ ├── lint_javascript.yml │ ├── lint_webdriver_ts.yml │ ├── test_webdriver_ts.yml │ ├── lint_webdriver_python.yml │ ├── types_webdriver_python.yml │ ├── test_webdriver_go.yml │ ├── test_webdriver_python.yml │ ├── scorecards.yml │ └── codeql.yml ├── webdriver_dotnet ├── DEVELOPING.md ├── SemanticLocators │ ├── SemanticLocators.Tests │ │ ├── SemanticLocators.Tests.csproj │ │ ├── TestAssignment.cs │ │ └── UnitTests.cs │ ├── SemanticLocators │ │ ├── SemanticLocatorException.cs │ │ └── SemanticLocators.csproj │ ├── SemanticLocators.sln │ └── .gitignore └── README.md ├── CONTRIBUTING.md └── README.md /javascript/.eslintignore: -------------------------------------------------------------------------------- 1 | src/lib/parser.ts -------------------------------------------------------------------------------- /webdriver_ts/.eslintignore: -------------------------------------------------------------------------------- 1 | src/lib/parser.ts -------------------------------------------------------------------------------- /javascript/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Google 2 | -------------------------------------------------------------------------------- /webdriver_python/src/data/.gitignore: -------------------------------------------------------------------------------- 1 | wrapper_bin.js -------------------------------------------------------------------------------- /webdriver_ts/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Google 2 | -------------------------------------------------------------------------------- /javascript/.gitignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | dist/ 3 | node_modules/ 4 | -------------------------------------------------------------------------------- /webdriver_ts/.gitignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | dist/ 3 | node_modules/ 4 | -------------------------------------------------------------------------------- /webdriver_java/src/main/resources/com/google/semanticlocators/.gitignore: -------------------------------------------------------------------------------- 1 | wrapper_bin.js -------------------------------------------------------------------------------- /webdriver_python/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | dist/ 3 | .pytype/ 4 | 5 | geckodriver.log 6 | -------------------------------------------------------------------------------- /webdriver_python/scripts/type_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | poetry run pytype src test 4 | -------------------------------------------------------------------------------- /docs/img/outer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/semantic-locators/HEAD/docs/img/outer.png -------------------------------------------------------------------------------- /webdriver_python/scripts/lint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | poetry run pylint src test --rcfile=.pylintrc 4 | -------------------------------------------------------------------------------- /docs/img/a11y_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/semantic-locators/HEAD/docs/img/a11y_tree.png -------------------------------------------------------------------------------- /docs/img/wildcard_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/semantic-locators/HEAD/docs/img/wildcard_name.png -------------------------------------------------------------------------------- /docs/img/explicit_semantics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/semantic-locators/HEAD/docs/img/explicit_semantics.png -------------------------------------------------------------------------------- /docs/img/native_semantics_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/semantic-locators/HEAD/docs/img/native_semantics_link.png -------------------------------------------------------------------------------- /docs/img/aria_labelledby_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/semantic-locators/HEAD/docs/img/aria_labelledby_example.png -------------------------------------------------------------------------------- /docs/img/native_semantics_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/semantic-locators/HEAD/docs/img/native_semantics_button.png -------------------------------------------------------------------------------- /webdriver_python/scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cp ../javascript/wrapper/wrapper_bin.js src/data/ 4 | 5 | poetry build 6 | -------------------------------------------------------------------------------- /webdriver_python/scripts/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cp ../javascript/wrapper/wrapper_bin.js src/data/ 4 | 5 | poetry run python -m unittest 6 | -------------------------------------------------------------------------------- /webdriver_go/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/google/semantic-locators/webdriver_go 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/tebeka/selenium v0.9.9 // indirect 7 | ) -------------------------------------------------------------------------------- /webdriver_python/scripts/publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cp ../javascript/wrapper/wrapper_bin.js src/data/ 4 | 5 | poetry run python -m unittest 6 | poetry publish --build -u semantic-locators -p $1 7 | -------------------------------------------------------------------------------- /javascript/src/semantic_locators.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright 2021 The Semantic Locators Authors 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | export {findElementBySemanticLocator, findElementsBySemanticLocator} from './lib/find_by_semantic_locator'; 8 | -------------------------------------------------------------------------------- /webdriver_ts/jasmine.json: -------------------------------------------------------------------------------- 1 | { 2 | "reporters": [ 3 | { 4 | "name": "jasmine-spec-reporter#SpecReporter", 5 | "options": { 6 | "displayStacktrace": "all" 7 | } 8 | } 9 | ], 10 | "spec_dir": "test", 11 | "spec_files": ["**/*.ts"] 12 | } -------------------------------------------------------------------------------- /pages/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |