Permalink
Browse files

commanderror not accessible via errorhandler

  • Loading branch information...
1 parent 23050b4 commit 9bee9bc0df98d40d5ff436dd9ada90e997be667c @christian-bromann christian-bromann committed Aug 18, 2016
Showing with 5 additions and 5 deletions.
  1. +1 −1 lib/getConnectionInformation.js
  2. +1 −1 lib/getStats.js
  3. +2 −2 lib/startAnalyzing.js
  4. +1 −1 lib/webdriverrtc.js
@@ -6,7 +6,7 @@ import { ErrorHandler } from 'webdriverio'
*/
export default function getConnectionInformation () {
if (!this.connection) {
- throw new ErrorHandler.CommandError(
+ throw new ErrorHandler('CommandError',
'No information got recoreded yet. Please run the startAnalyzing command first'
)
}
View
@@ -22,7 +22,7 @@ export default async function getStats (duration) {
const stats = (await this.browser.execute(getStatsScript, from, to, this.interval)).value
if (!stats) {
- throw new ErrorHandler.CommandError('There was a problem receiving the results')
+ throw new ErrorHandler('CommandError', 'There was a problem receiving the results')
}
stats.forEach((result, i) => {
@@ -6,7 +6,7 @@ import startAnalyzingScript from './browser/startAnalyzing'
*/
export default async function startAnalyzing (selectorMethod = () => false) {
if (this.analyzingScriptIsInjected) {
- throw new ErrorHandler.CommandError('analyzing already started')
+ throw new ErrorHandler('CommandError', 'analyzing already started')
}
await this.browser.timeouts('script', 1000)
@@ -18,7 +18,7 @@ export default async function startAnalyzing (selectorMethod = () => false) {
)
if (!res || Object.keys(res).length === 0) {
- throw new ErrorHandler.CommandError('WebRTC connection didn\'t get established')
+ throw new ErrorHandler('CommandError', 'WebRTC connection didn\'t get established')
}
const ipAddressLocal = res.local.ipAddress.split(/:/)
View
@@ -9,7 +9,7 @@ import urlScript from './browser/url'
* WebdriverRTC
*/
class WebdriverRTC {
- constructor (webdriverInstance, options) {
+ constructor (webdriverInstance, options = {}) {
/**
* browser that measures connection required
*/

0 comments on commit 9bee9bc

Please sign in to comment.