0

Can any one help me the set up required to run the Protractor test script in Microsoft edge browser .

I have tried below steps

  1. In the Protractor configuration file

    { 'browserName' : 'MicrosoftEdge', 'SharedTestFiles' : false }

    seleniumArgs : ['-Dwebdriver.edge.driver=C:/Windows/SystemApps/Microsoft.MicrosoftEdge_8wekyb3d8bbwe/MicrosoftEdge.exe'],

  2. run the selenium webdriver server with the below command webdriver-manager start

It is displaying below error message

 SessionNotCreatedError: Unable to create new service: EdgeDriverService
vasundhara
  • 109
  • 2
  • 10
  • Did you tried with Webdriver-Manager server? – Yash Jagdale Jan 17 '18 at 14:47
  • I run the selenium server using this command webdriver-manager start . run the protractor configuration file using this command protractor protractor.conf.js --suite inbox .. Still i am getting above error message – vasundhara Jan 18 '18 at 06:15

1 Answers1

0

I tried below and worked fine for me:- config.js

exports.config = {
  seleniumAddress: 'http://localhost:4444',
  capabilities: {
    browserName: 'MicrosoftEdge',
    elementScrollBehavior: 1,
    nativeEvents: false
  },
  framework: 'jasmine',
  baseUrl: 'http://angularjs.org',
  specs: [
    'spec.js'
  ],
  jasmineNodeOpts: {
    defaultTimeoutInterval: 30000
  }
}

Test Case/Spec file:-

    describe('IE Test cases suite', function() {
      it('first IE test case', function() {
        browser.get(browser.baseUrl);
        browser.getCurrentUrl().then(function(url){
           console.log(url);
         });
       });
    });

Also you can find some pre-requisites for webdriver manager refer https://github.com/angular/protractor/issues/2377#issuecomment-290836086

Yash Jagdale
  • 1,446
  • 14
  • 17
  • I am also using the same code you mentioned except the baseUrl : i am using "'http://localhost:4200/'" still it is displaying same error message . – vasundhara Jan 18 '18 at 06:29
  • Refer below [link](https://stackoverflow.com/questions/47891742/how-to-configure-protractor-js-for-running-tests-in-microsoft-edge) You will get the better solution here. – Yash Jagdale Jan 18 '18 at 08:22