Skip to content

Commit 1631d07

Browse files
authored
Using async javascript command instead of synch
1 parent 948720a commit 1631d07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

axe_selenium_python/axe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def execute(self, context=None, options=None):
3636
:param context: which part of the page to analyze and/or what to exclude.
3737
:param options: dictionary of aXe options.
3838
"""
39-
template = 'return axe.run(%s).then(function(result){return result;});'
39+
template = 'return axe.run(%s).then(arguments[arguments.length - 1]);'
4040
args = ''
4141

4242
# If context parameter is passed, add to args
@@ -50,7 +50,7 @@ def execute(self, context=None, options=None):
5050
args += '%s' % options
5151

5252
command = template % args
53-
response = self.selenium.execute_script(command)
53+
response = self.selenium.execute_async_script(command)
5454
return response
5555

5656
def run(self, context=None, options=None, impact=None):

0 commit comments

Comments
 (0)