Skip to content

MultiRemote not supported #28

@ericzered

Description

@ericzered

Hello,
I have an issue with multiremote and wdio-image-comparison-service :
I'm using the service 'image-comparison' without problem when I have only 1 browser, but when I run tests with multiremote, I have an error.

Example and repro:

In my wdio.conf.js I have this capabilities :

exports.config = {
...
capabilities: [{ browserName: 'chrome' }],
...
}

in my spec file, I can do this without problem:

browser.url('http://google.fr')
browser.saveScreen('examplePage')

But when I try to do multiremote like this :

exports.config = {
...
capabilities: { chrome:{capabilities: { browserName: 'chrome' }},  firefox:{capabilities: { browserName: 'firefox' }}},
...
}

I can used the 'basic' wdio method like .url(), click().... but not the services.
So this :

browser['chrome'].url('http://google.fr')
browser['firefox'].url('http://bing.com')
browser['chrome'].saveScreen('examplePage')

opens Chrome and Firefox, goes to excepted url but just after give me this error :

ERROR @wdio/sync: TypeError: Cannot read property 'browserName' of undefined
at getInstanceData (/Users/user/Work/Git/QATestAuto/node_modules/wdio-image-comparison-service/build/utils.js:45:72)
at WdioImageComparisonService.before (/Usersuser/Work/Git/QATestAuto/node_modules/wdio-image-comparison-service/build/service.js:43:53)
at execHook (/Users/user/Work/Git/QATestAuto/node_modules/@wdio/sync/build/executeHooksWithArgs.js:46:23)
browser.chrome.saveScreen is not a function

(I've tried to use browsername like chrome.saveScreen() with the same result)

Environment (please complete the following information):

  • Node.js version: 11.14.0
  • NPM version: 6.9.0
  • Browser name and version: all browsers
  • Platform name and version: [e.g. Windows 10]
  • WebdriverIO version: 5.10.4
  • wdio-image-comparison-service version: 1.12.1

Thanks !

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions