Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Fix axe-cli for release#5

Merged
marcysutton merged 4 commits intomasterfrom
fix-for-release
Feb 2, 2017
Merged

Fix axe-cli for release#5
marcysutton merged 4 commits intomasterfrom
fix-for-release

Conversation

@marcysutton
Copy link
Copy Markdown
Contributor

@marcysutton marcysutton commented Dec 23, 2016

I couldn't run axe-cli at all without these changes–I kept running into Issue #3 and the only way to fix it was to remove the call to config.driver.quit() in lib/webdriver.js. I couldn't find a way to check for a driver session id before making that call, so the solution was to remove it since it threw an error in .catch(e) in axe-test-urls.js:77, even after results had successfully completed:

Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
    at ClientRequest.<anonymous> (/Users/marcysutton/Sites/Deque/axe-cli/node_modules/selenium-webdriver/http/index.js:238:15)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1276:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
From: Task: WebDriver.quit()
    at WebDriver.schedule (/Users/marcysutton/Sites/Deque/axe-cli/node_modules/selenium-webdriver/lib/webdriver.js:816:17)
    at WebDriver.quit (/Users/marcysutton/Sites/Deque/axe-cli/node_modules/selenium-webdriver/lib/webdriver.js:849:23)
    at stopDriver (/Users/marcysutton/Sites/Deque/axe-cli/lib/webdriver.js:39:17)
    at testPages (/Users/marcysutton/Sites/Deque/axe-cli/lib/axe-test-urls.js:26:3)
    at /Users/marcysutton/Sites/Deque/axe-cli/lib/axe-test-urls.js:80:5
    at ManagedPromise.invokeCallback_ (/Users/marcysutton/Sites/Deque/axe-cli/node_modules/selenium-webdriver/lib/promise.js:1366:14)
    at TaskQueue.execute_ (/Users/marcysutton/Sites/Deque/axe-cli/node_modules/selenium-webdriver/lib/promise.js:2970:14)
    at TaskQueue.executeNext_ (/Users/marcysutton/Sites/Deque/axe-cli/node_modules/selenium-webdriver/lib/promise.js:2953:27)
    at asyncRun (/Users/marcysutton/Sites/Deque/axe-cli/node_modules/selenium-webdriver/lib/promise.js:2813:27)
    at /Users/marcysutton/Sites/Deque/axe-cli/node_modules/selenium-webdriver/lib/promise.js:676:7

Removing that call didn't seem to affect the functionality: I could run axe-cli on multiple URLs and it returned results successfully, multiple times in a row. I think when you kill off Phantomjs it takes down the driver anyway, so there is nothing left running on port 4444.

I also added a fix for the Selenium URL since it would return an HTML error page on the Selenium website otherwise.

Closes #3.

@marcysutton
Copy link
Copy Markdown
Contributor Author

@WilcoFiers @iandotkelly I ran this on another machine and it only worked with my PR. I think we should merge it

@marcysutton marcysutton merged commit 4bb827d into master Feb 2, 2017
@marcysutton marcysutton deleted the fix-for-release branch June 27, 2017 20:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant