Saturday, December 15Be an Automation Engineer

Tag: logs

Setting Logging preferences in protractor: loggingPrefs

Protractor

There are different loggers and their log levels in protractor. Click here to read about loggers.

We can configure the logging levels in protraction configuration file.

capabilities: { 'browserName': 'chrome', 'loggingPrefs': { 'driver': 'WARNING', 'server': 'WARNING', 'browser': 'INFO' } }

Execute the below spec to capture the console log.

describe('Capture Console messages', function() { beforeEach(function() { browser.get('http://angularjs.org/') }); » Continue Reading.

Loggers and logging levels in protractor

Protractor

There are three different loggers in protractor.

  • Driver
  • Server
  • Browser

Driver logger:Driver logger is to capture the messages logged at driver level(Logged by the webdriver). Server logger: Server logger is to capture the messages logged at selenium server console. Browser logger: Browser logger is to capture the messages logged in the Browser console.

The logging levels available in » Continue Reading.

Identifying Javascript errors in a webpage using Protractor

Protractor

Javascript errors are very common in any web application. It is possible that the Javascript errors may skip through testers eye. So, it would be better if an automation tool identify them well before they cause any problems in production.

As Protractor was implemented using JavaScript, we can easily capture the Javascript errors from the browser’s console.

Use the below » Continue Reading.