Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change def axe.execute() to axe.run() to mirror axe-core naming #162

Merged
merged 1 commit into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ Usage
# Inject axe-core javascript into page.
axe.inject()
# Run axe accessibility checks.
results = axe.execute()
results = axe.run()
# Write results to file
axe.write_results(results, 'a11y.json')
driver.close()
# Assert no violations are found
assert len(results["violations"]) == 0, axe.report(results["violations"])

The method ``axe.execute()`` accepts two parameters: ``context`` and ``options``.
The method ``axe.run()`` accepts two parameters: ``context`` and ``options``.

For more information on ``context`` and ``options``, view the `aXe documentation here <https://github.com/dequelabs/axe-core/blob/master/doc/API.md#parameters-axerun>`_.

Expand Down
2 changes: 1 addition & 1 deletion axe_selenium_python/axe.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def inject(self):
with open(self.script_url, "r", encoding="utf8") as f:
self.selenium.execute_script(f.read())

def execute(self, context=None, options=None):
def run(self, context=None, options=None):
"""
Run axe against the current page.

Expand Down
2 changes: 1 addition & 1 deletion axe_selenium_python/tests/test_axe.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def _perform_axe_run(driver):
driver.get("file://" + _DEFAULT_TEST_FILE)
axe = Axe(driver)
axe.inject()
data = axe.execute()
data = axe.run()
return data


Expand Down