Search code examples
node.jsseleniumwebdriver-iocucumberjs

How I can start IE in 32bit mode in webdriver.io


I am running an WebDriver.io test using gulp-wdio npm pakage on selenium-standalone

The Code that I run in gulp is:

gulp.task('e2e', function () {
return gulp.src('wdio.conf.js')
    .pipe(wdio({
        wdio: {
            specs: './test/features/**/*.feature'
        }
    }));
});

And my wdio.conf.js define browsers this way:

capabilities: [     
        {
            browserName: 'internet explorer',
            version: 'ANY'
        }
    ],

How ever the typing is very slow, i had found on the internet that running 32 bit version of the web-driver resolves the issue, how ever I can't find how to configure the capabilities or some other place to run the IE32 bit driver by default... Any help will be appreciated @:-)


Solution

  • After 2 days of research I had found the solution !!!

    There is a configuration file that need to be supplied to the selenium standalone as shown in this Example
    so our final setup is done in this way:

    We have a configuration file called wdio.browsers.setup.js that contains the browsers setup:

    module.exports = {
        baseURL: 'https://selenium-release.storage.googleapis.com',
        version: '3.3.1',
        drivers: {
            chrome: {
                version: '2.29',
                arch: process.arch,
                // - Recent versions of the driver: https://sites.google.com/a/chromium.org/chromedriver/
                baseURL: 'https://chromedriver.storage.googleapis.com'
            },
            ie: {
                version: '3.0.0',
                arch: 'ia32',
                // - Recent versions of the driver: http://selenium-release.storage.googleapis.com/index.html
                baseURL: 'https://selenium-release.storage.googleapis.com'
            },
            firefox: {
                version: '0.15.0',
                arch: process.arch,
                baseURL: 'https://github.com/mozilla/geckodriver/releases/download'
            }
        }
    };
    

    and then inside wdio.conf.js we load it and assign to a special parameters

    let browsersSetup = require('./wdio.browsers.setup');
    exports.config = {
    
       seleniumArgs: browsersSetup,
        seleniumInstallArgs: browsersSetup,
    

    After that all is working fine @:-)

    Note: if you have your web-driver installed globally remove the global setup first it's located in:

    C:\Users\%USERNAME%\AppData\Roaming\npm
    

    Then you can run the local installation using:

    ./node_modules/.bin/selenium-standalone install --config=../../wdio.browsers.setup.js