Virendra Singh
Virendra Singh

Reputation: 65

In e2e testing, blank page is opened in Chromium Edge (New Edge Browser) using Protractor

1.Open the MS Chromium edge and type the command "edge://settings/help" to check the version 2. Download the MS Chromium edge webdriver and placed it into project directory 3. Set the desired capabilities in conf.js file 4. Start the server using command "webdriver-manager start --edge msedgedriver.exe" 5. Run the test using the "protractor conf.js"

Environment:

Chromium Edge Version =  83.0.478.37
Chromium web driver   = 83.0.478.37
Selenium server version = 3.141.59
JDK  =1.8.191

conf.js

exports.config = {
    // The address of a running selenium server.
    seleniumAddress: 'http://localhost:4444/wd/hub',
     capabilities: {
       'browserName': 'chrome',
       'goog:chromeOptions': {
        // Faked out chrome binary
        'binary':'C:\\Program Files (x86)\\Microsoft\\Edge Beta\\Application\\msedge.exe'
      }

    },
    //Path of Chromium edge driver
    chromeDriver:'./msedgedriver.exe',

    specs: ['spec.js'],
    }
  };

Also tried with using desired capabilities in spec.js file as well but still blank page is opened

describe('slow calculator', function() {
    beforeEach(function() {
        let options = new edge.Options();
        options.setEdgeChromium(true);
        //options.setBinaryPath("C:\\Program Files (x86)\\Microsoft\\Edge Beta\\Application\\msedge.exe");

        let browser = edge.Driver.createSession(options);

        browser.get('http://juliemr.github.io/protractor-demo/');

    });
 });

enter image description here

Upvotes: 0

Views: 614

Answers (1)

Abhilash Sahoo
Abhilash Sahoo

Reputation: 46

While starting webdriver-manager, ensure the path to msedgedriver is specified.

webdriver-manager start --edge "pathToEdgeDriver/msedgedriver.exe"

The capabilities object should have MicrosoftEdge as browserName.

seleniumAddress: 'http://localhost:4444/wd/hub',
   capabilities: {
        'browserName': 'MicrosoftEdge'
    }

Upvotes: 1

Related Questions