I'm running Protractor test that clicks on buttons on a page that open new windows with various sites URLs. While Chrome automatically opens these windows as tabs, Firefox and Safari don't automatically do this, and often have popup blockers enabled.
I need these newly opened windows to be tabs within the same browser window instead so I can use getAllWindowHandles
to access them later.
How do I set the following settings in an automated fashion using protractor:
Firefox:
tabs/Open new windows in a new tab instead to true
tabs/Don't load tabs until selected to true
tabs/When I open a link in a new tab, switch to it immediately to false
Content/block popup windows to false
Safari:
tabs/open pages in tabs instead of windows to Always
tabs/command-click opens a link in a new tab to true
tabs/when a new tab or window opens, make it active to false
block popup window to false
Here is my config file right now:
exports.config = {
seleniumPort: null,
chromeDriver: './selenium/chromedriver',
seleniumArgs: [],
sauceUser: null,
sauceKey: null,
seleniumAddress: 'http://localhost:4444/wd/hub',
allScriptsTimeout: 30000,
specs: [
'app/test/e2e/lib/csv_reporter.js',
'app/test/e2e/lib/rllib.js',
'app/test/e2e/lib/rlmatchers.js',
'app/test/e2e/client_specific_config/globals.js',
'app/test/e2e/client_specific_config/ShopDeals_FreeShipping_Functionality_spec.js',
'app/test/e2e/client_specific_config/ShopByCategory_ItemCheck_spec.js'
capabilities: {
'browserName': 'chrome'
},
baseUrl: 'http://test-static.com/widgets/mall/#/Home',
rootElement: 'html',
onPrepare: function() {
},
If this is directly impossible I would appreciate any workarounds, as this single handedly determines whether my tests run. Thanks!