Closed
Description
The tap reporter does the following on fail:
console.log(err.stack.replace(/^/gm, ' '));
Depending on the stack trace, this can produce invalid tap output. For example, a tap file with a stack trace from WebDriverJs is below...invalid (try it in http://instanttap.appspot.com/ ).
Ideas for sanitizing the stack trace?
Or providing an option to leave it on err.stack and not print it (so it can be potentially written as a file or written at the end)?
1..5
Selenium Server started on port 4444
Local http server listening at http://localhost:8080
Webdriver navigating to http://localhost:8080/test/ui/fixtures/index.html
ok 1 Instancing Toggle Switch from provided DOM data attribute should automatically instance a toggle button from the expected DOM
ok 2 Instancing Toggle Switch from dynamically-added DOM should not automatically instance a toggle button without the expected DOM
not ok 3 Instancing Toggle Switch from dynamically-added DOM should be instanced via JavaScript
AssertionError: expected true to be false
at <anonymous>
==== async task ====
WebDriver.findElements(By.xpath("//input[last()]/ancestor::div[contains(@class, 'has-switch')]"))
at webdriver.WebDriver.schedule (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:267:15)
at webdriver.WebDriver.findElements (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:825:17)
at webdriver.WebDriver.isElementPresent (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:787:29)
at /Users/212362413/projects/dx-components/toggle-switch/test/ui/spec/toggle-switch-ui-spec.js:74:20
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/goog/base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1445:20)
at notify (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
at Object.webdriver.promise.asap (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:678:5)
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1456:25)
at notify (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1312:10
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/goog/base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1445:20)
at notify (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/goog/base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1445:20)
at notify (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:613:51
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/http/http.js:96:5
at IncomingMessage.<anonymous> (/Users/212362413/npm/lib/node_modules/selenium-webdriver/http/index.js:113:7)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
==== async task ====
at webdriver.promise.ControlFlow.wait (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1202:15)
at webdriver.WebDriver.wait (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:546:21)
at /Users/212362413/projects/dx-components/toggle-switch/test/ui/spec/toggle-switch-ui-spec.js:45:20
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/goog/base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1445:20)
at notify (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
at Object.webdriver.promise.asap (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:678:5)
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1456:25)
at notify (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1312:10
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/goog/base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1445:20)
at notify (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/goog/base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:1445:20)
at notify (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/promise.js:613:51
at /Users/212362413/npm/lib/node_modules/selenium-webdriver/lib/webdriver/http/http.js:96:5
at IncomingMessage.<anonymous> (/Users/212362413/npm/lib/node_modules/selenium-webdriver/http/index.js:113:7)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
ok 4 Underlying form field interactions should set the "checked" property of the checkbox inside the toggle button
ok 5 Underlying form field interactions should unset the "checked" property of the checkbox inside the toggle button
# tests 5
# pass 4
# fail 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment