How can I allow clipboard permission popups in automated tests using Selenium web driver, Javascript, and grunt?
https://i.stack.imgur.com/rvIag.png
The --enable-clipboard
and --enable-clipboard-features
arguments in the code below do not seem to have any effect.
import { Builder, Capabilities } from 'selenium-webdriver';
const chromeOptions = {
// args: ['--enable-clipboard']
args: ['--enable-clipboard-features']
};
const driver = await new Builder()
.withCapabilities(Capabilities.chrome())
.setChromeOptions(chromeOptions)
.build();
The following code snippet is also unsuccessful:
capabilities: {
'browserName': 'chrome',
'chromeOptions': { 'desiredCapabilities/goog:chromeOptions/prefs/profile.content_settings.exceptions.clipboard', {
'[*.],*': { last_modified: '1576491240619', setting: 1 },
}
}
}
}