I am doing protractor test, and I am using ExpectedConditions as below.

var EC = protractor.ExpectedConditions;
var el = element(by.css('[class="loader-class ng-scope"]'));

My Test is running quite good. But in console screen, I am getting this type of exception as

Exception thrown: Keeping the Selenium server alive

enter image description here

As you can see, my test is in success status. So My question is, Why this exception is coming here? and how can I remove it from console screen?

  • Add the stack trace and code where this error is thrown.
    – FDM
    Sep 7 '17 at 5:45
  • This is not error, This is a warning FDM. and I have added the stack trace from where it came from. It come when I have used ExpectedConditions(EC). Sep 7 '17 at 6:04
  • Is this error coming from Selenium or from protracor? Can you find the source place in the code where that specific error text is generated and put that method in here? I have never seen that in selenium specifically so I'm thinking it's a wrapper method with protractor or something...
    – mutt
    Sep 7 '17 at 16:53
  • This is coming from protractor. I have tracked down. these are the specific lines...var EC = protractor.ExpectedConditions; browser.wait(EC.not(EC.presenceOf(el)),25000);......and by the way,,,My test case get succssfull but I am getting warnings like above, mutt Sep 7 '17 at 17:36

These exceptions are actually just warnings that the the selenium server was kept alive, this is the timeout protection doing its job.

The console will contain messages like that and its not a problem.

You could remove the log message or filter them from the console if its bothering you.

see here for how to send those log messages to a file https://sites.google.com/a/chromium.org/chromedriver/logging

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.