user5167985
user5167985

Reputation:

Error while waiting for Protractor to sync with the page: in Protractor IE11 execution

I am getting error in IE11 as

Error while waiting for Protractor to sync with the page: "root element (body) has no injector. this may mean it is not inside ng-app.

when I execute my protractor scripts.I set framework: jasmine2 but it didn't help out.However same working fine in Chrome and Firefox.

Following is my code:

// The address of a running selenium server.
  seleniumAddress: 'http://localhost:4444/wd/hub',
  //config.seleniumAddress = 'http://127.0.0.1:4444/wd/hub';
  maxSessions: 1,

 capabilities: 
  {
  'browserName': 'internet explorer'
  },
      framework: 'jasmine',
              specs: ['TC_Sprint2_Case1.js'],

onPrepare: function() {   
      beforeEach(function() {
        browser.driver.manage().window().setSize(1280, 1024);
    });  

      jasmine.getEnv().addReporter(new HtmlReporter({
         baseDirectory: 'D:/Manoj/TestReport3/',

         docTitle: 'Test Case Execution Details',
         docName: 'BYTestReport.html',
//Meta builder      
  metaDataBuilder: function(spec, descriptions, results, capabilities){
            var metaData = {
                description: descriptions.join('|'),
                 passed: results.passed(),
                 os: 'Windows 7',               
                 browser: {
                  name: capabilities.caps_.browserName
                  , version: capabilities.caps_.version
                }
              };
            if(results.items_.length > 0) {
              var result = results.items_[0];
             metaData.message = result.message;                    
               metaData.trace = result.trace.stack;                         
            }           
return metaData;
}  // Meta Builder ends 
}));
   }, 

Upvotes: 3

Views: 1036

Answers (2)

user5167985
user5167985

Reputation:

We can use browser.driver.get('https://google.co.in'); instead of browser.get('https://google.co.in');

Earlier I used browser.get(URL). It caused the synchronization problem.When I use browser.driver.get(URL).It solved the problem.

Upvotes: 1

MBielski
MBielski

Reputation: 6620

In your config, try setting nativeEvents to false:

capabilities:{
    browserName: 'internet explorer'
    nativeEvents:false
},

IE sometimes hangs on startup and this seems to solve it for me. This being said, there are other things that could cause IE to not bind.

Upvotes: 0

Related Questions