Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions axe_selenium_python/axe.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ def execute(self, context=None, options=None):
:param context: which page part(s) to analyze and/or what to exclude.
:param options: dictionary of aXe options.
"""
template = "var callback = arguments[arguments.length - 1];" \
"axe.run(%s).then(results => callback(results))"
template = (
"var callback = arguments[arguments.length - 1];"
+ "axe.run(%s).then(results => callback(results))"
)
args = ""

# If context parameter is passed, add to args
Expand Down
11 changes: 7 additions & 4 deletions axe_selenium_python/tests/test_axe.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ def firefox_driver():
def chrome_driver():
opts = webdriver.ChromeOptions()
opts.headless = True
opts.add_argument('--no-sandbox')
driver_path = getenv('CHROMEDRIVER_PATH')
driver = webdriver.Chrome(options=opts, executable_path=driver_path) \
if driver_path else webdriver.Chrome(options=opts)
opts.add_argument("--no-sandbox")
driver_path = getenv("CHROMEDRIVER_PATH")
driver = (
webdriver.Chrome(options=opts, executable_path=driver_path)
if driver_path
else webdriver.Chrome(options=opts)
)
yield driver
driver.close()

Expand Down