Skip to content

Conversation

@neverstew
Copy link
Contributor

Fixes #118 - empty results on chrome driver.

The issue was not using the correct method on the JavascriptExecutor interface. We can run the script asyncronously and return the results using the callback.

I've also added a test case to use a chromedriver.

@neverstew neverstew force-pushed the feature/execute-script-asyncronously branch from cabc7b0 to b57b793 Compare September 25, 2018 14:13
@neverstew
Copy link
Contributor Author

neverstew commented Sep 25, 2018

@stephendonner / @kimberlythegeek / other contributors - got a chance to get this working locally but just struggling to get the chromedriver set up on travis. If anyone gets the chance to have a look that would be fantastic.

@neverstew neverstew force-pushed the feature/execute-script-asyncronously branch from 041e69c to ff73b0a Compare September 26, 2018 08:18
@neverstew
Copy link
Contributor Author

@moz-hwine - can an admin get to this any time soon?

@kimberlythegeek
Copy link
Contributor

@matt-l-w Hi! First I want to say that I really appreciate your contribution! 😄

Also, my apologies for the delay, I was on leave last week.

I will look over this today or tomorrow. Currently trying to get caught up on emails, and everything else 🙂

@neverstew
Copy link
Contributor Author

No worries! Hope the break was good 😃

Just checking it wasn't lost in PR purgatory 😛

@kimberlythegeek
Copy link
Contributor

@matt-l-w I needed the reminder! I was pretty happy when I saw the PR and don't want it to slip through the cracks :)

Copy link
Contributor

@kimberlythegeek kimberlythegeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really appreciate this work! Thanks again!


Node dependencies must be installed by running `npm install` inside the axe-selenium-python directory.

You can run the tests using
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Sometimes I struggle with writing thorough documentation.

"""
template = "return axe.run(%s).then(function(result){return result;});"
template = "var callback = arguments[arguments.length - 1];" \
"axe.run(%s).then(results => callback(results))"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work :)

I don't have a lot of experience with JavaScript; I tried a lot of different approaches and didn't get it to work!

@kimberlythegeek kimberlythegeek merged commit e8fde61 into django-commons:master Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants