Skip to content

Commit 85c389a

Browse files
committed
Merge branch 'master' into develop
2 parents df1552f + e85ea45 commit 85c389a

File tree

4 files changed

+39
-52
lines changed

4 files changed

+39
-52
lines changed

.travis.yml

Lines changed: 30 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,61 @@
11
sudo: required
22
language: python
3+
node_js: stable
4+
addons:
5+
firefox: latest-nightly
6+
chrome: stable
37

48
cache:
59
directories:
610
- $HOME/.cache/pip
711
- $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages
812
- node_modules
913

10-
install: pip install -r axe_selenium_python/tests/requirements/tests.txt
11-
script: skip
14+
before_install:
15+
- wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER/chromedriver_linux64.zip
16+
- mkdir $HOME/chromedriver && unzip /tmp/chromedriver.zip -d $HOME/chromedriver
17+
- export PATH=$HOME/chromedriver:$PATH
18+
- wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER/geckodriver-v$GECKODRIVER-linux64.tar.gz
19+
- mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
20+
- export PATH=$HOME/geckodriver:$PATH
21+
- firefox --version
22+
- geckodriver --version
23+
install:
24+
- pip install tox
25+
26+
before_script:
27+
- npm install
28+
script: tox
1229

1330
jobs:
1431
include:
1532
- stage:
16-
language: python
1733
python: 3.6
18-
node_js: stable
19-
addons:
20-
firefox: latest-nightly
21-
chrome: stable
2234
env: TOXENV=py36 MOZ_HEADLESS=1 GECKODRIVER=0.23.0 CHROMEDRIVER=2.40
23-
before_install:
24-
- wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER/chromedriver_linux64.zip
25-
- mkdir $HOME/chromedriver && unzip /tmp/chromedriver.zip -d $HOME/chromedriver
26-
- export PATH=$HOME/chromedriver:$PATH
27-
- wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER/geckodriver-v$GECKODRIVER-linux64.tar.gz
28-
- mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
29-
- export PATH=$HOME/geckodriver:$PATH
30-
- firefox --version
31-
- geckodriver --version
32-
install:
33-
- pip install tox
34-
before_script:
35-
- npm install
36-
script: tox
3735
- stage:
38-
language: python
3936
python: 2.7
40-
node_js: stable
41-
addons:
42-
firefox: latest-nightly
43-
chrome: stable
4437
env: TOXENV=py27 MOZ_HEADLESS=1 GECKODRIVER=0.23.0 CHROMEDRIVER=2.40
45-
before_install:
46-
- wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER/chromedriver_linux64.zip
47-
- mkdir $HOME/chromedriver && unzip /tmp/chromedriver.zip -d $HOME/chromedriver
48-
- export PATH=$HOME/chromedriver:$PATH
49-
- wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER/geckodriver-v$GECKODRIVER-linux64.tar.gz
50-
- mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
51-
- export PATH=$HOME/geckodriver:$PATH
52-
- firefox --version
53-
- geckodriver --version
54-
install:
55-
- pip install tox
56-
before_script:
57-
- npm install
58-
script: tox
5938
- stage:
60-
language: python
39+
python: 3.6
40+
before_install: skip
41+
install: pip install tox
6142
env: TOXENV=flake8
62-
install:
63-
- pip install tox
64-
65-
script: tox
6643
- stage: deploy
44+
before_install: skip
45+
install: skip
46+
script: skip
47+
skip_cleanup: true
6748
deploy:
6849
provider: pypi
6950
user: kimberlythegeek
7051
password:
7152
secure: LHsL91XR32/M4r5ETAvaN/vUTakYByIfdwdCw6EI59LBvSnwaSant010QIl39+uafuev57yzUC/Y+orefczjkJnG3KdQBNS0Rt/zWIMw0Dr6Fp41Vg66e5URK/FRIwK36WlWzOcd3GkrQLLaDeqnXVzDWVMuXPP9/1ssu6mvriSeLctPsmX5N6m4yZwxNtpFsTLEh+BumXiamCuqjTI0RpyqxYlUVfio0G5LWeY9rkPskrwbSbc8xhq/PMk/ecLtlAxdn8AwgjLYCAt9d6NRfgL4Yp0R+kkfUQsX1Wf8A/pBNRr8Ht8Hy4CNlnEphgao4fgVEY4dc6tZL3FXOU9jQSmbChoANlbPzDhO+nb6d/QW5vLHVDufKyRQqtFxD90XFXlWFc/0gnD6tPZhi+UEFmBMoo9ugWDnYUeBd1T3lbwKT7sOmOQS58WhDVMLxPwr2BfgItGrNsaVHmzx9v0BnxZvD5ilmvNPrad6Rcsa0N8GtNXpnbyaupWzA97bemzuLqNHOjTm6TMZWRol6lLEJsJ1MRs7xWI4DYztXzlWITH7rvf6NNyvXKe9FPV3Lfoei3k1mT8QuEh6bIEFpBKRVV0ObQVSfFQ4M4wbgDBb3CbHVqMqFHgi98mpUo9tNGm4uzZCXw3hfEQpUPugKaH+VHoaylE+MR+fOhsyVlLQluM=
72-
install: skip
73-
script: skip
74-
skip_cleanup: true
7553
on:
7654
tags: true
7755
branch: master
7856
distributions: "sdist bdist_wheel"
7957
skip_cleanup: true
58+
59+
after_success:
60+
- pip install coveralls
61+
- coveralls

README.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ axe-selenium-python integrates aXe and selenium to enable automated web accessib
2020
.. image:: https://api.dependabot.com/badges/status?host=github&repo=mozilla-services/axe-selenium-python
2121
:target: https://dependabot.com
2222
:alt: Dependabot
23+
.. image:: https://coveralls.io/repos/github/mozilla-services/axe-selenium-python/badge.svg?branch=master
24+
:target: https://coveralls.io/github/mozilla-services/axe-selenium-python?branch=master
25+
:alt: Coveralls
26+
2327

2428

2529
Requirements
@@ -30,6 +34,7 @@ You will need the following prerequisites in order to use axe-selenium-python:
3034
- selenium >= 3.0.0
3135
- Python 2.7 or 3.6
3236
- The appropriate driver for the browser you intend to use, downloaded and added to your path, e.g. geckodriver for Firefox:
37+
3338
- `geckodriver <https://github.com/mozilla/geckodriver/releases>`_ downloaded and `added to your PATH <https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path#answer-40208762>`_
3439

3540
Installation
@@ -57,14 +62,14 @@ Usage
5762
# Inject axe-core javascript into page.
5863
axe.inject()
5964
# Run axe accessibility checks.
60-
results = axe.execute()
65+
results = axe.run()
6166
# Write results to file
6267
axe.write_results(results, 'a11y.json')
6368
driver.close()
6469
# Assert no violations are found
6570
assert len(results["violations"]) == 0, axe.report(results["violations"])
6671
67-
The method ``axe.execute()`` accepts two parameters: ``context`` and ``options``.
72+
The method ``axe.run()`` accepts two parameters: ``context`` and ``options``.
6873

6974
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>`_.
7075

axe_selenium_python/axe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def inject(self):
2626
with open(self.script_url, "r", encoding="utf8") as f:
2727
self.selenium.execute_script(f.read())
2828

29-
def execute(self, context=None, options=None):
29+
def run(self, context=None, options=None):
3030
"""
3131
Run axe against the current page.
3232

axe_selenium_python/tests/test_axe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _perform_axe_run(driver):
6161
driver.get("file://" + _DEFAULT_TEST_FILE)
6262
axe = Axe(driver)
6363
axe.inject()
64-
data = axe.execute()
64+
data = axe.run()
6565
return data
6666

6767

0 commit comments

Comments
 (0)