kjb
kjb

Reputation: 3175

Using native messaging within Selenium ChromeDriver?

I'm working on a chrome extension that uses native messaging. Native messaging works great on my personal copy of Chrome, but I get error messages from the extension when using it in selenium via ChromeDriver:

Error in event handler for runtime.onMessage: Error: Attempting to use a disconnected port object

I'm loading the extension via the following protractor config:

capabilities: {
    'browserName': 'chrome',
    'chromeOptions': {
        'args': [
            '--load-extension=./build/chrome'
        ]
    },
}

Does one have to do something special to enable native messaging in ChromeDriver? I've tried adding our native messaging manifest file(s) to the global locations for both Chrome and Chromium, but still no luck.

Upvotes: 4

Views: 431

Answers (1)

georgexsh
georgexsh

Reputation: 16634

as of 2018.11, with Chrome 70 and chromedriver 2.43, native messaging works well.

Upvotes: 1

Related Questions