-
Notifications
You must be signed in to change notification settings - Fork 130
Enabling Performance Log for Chrome
bialkos edited this page Mar 15, 2021
·
6 revisions
Note: this function is temporarily not working due to an issue within Selenium: https://github.com/SeleniumHQ/selenium/issues/7335
Performance logging is NOT enabled by default. So when creating a new session, you have to enable it in ProjectTestBase class.
public ProjectTestBase()
{
this.driverContext.DriverOptionsSet += this.DriverContext_DriverOptionsSet;
}
...
private void DriverContext_DriverOptionsSet(object sender, DriverOptionsSetEventArgs args)
{
if (args == null || args.DriverOptions == null)
{
throw new ArgumentNullException();
}
args.DriverOptions.SetLoggingPreference("performance", OpenQA.Selenium.LogLevel.All);
args.DriverOptions.SetLoggingPreference(LogType.Browser, OpenQA.Selenium.LogLevel.All);
}
and collect them after test
[TearDown]
public void AfterTest()
{
var logs = this.driverContext.Driver.Manage().Logs;
var perfLogs = logs.GetLog("performance");
foreach (var perfLog in perfLogs)
{
Logger.Info(perfLog.ToString);
}
}
more details here.
- Home
- Getting started
- Parallel tests execution
- MsTest DataDriven tests from Xml and CSV files
- NUnit DataDriven tests from Xml, CSV and Excel files
- Comparing files by NUnit DataDriven tests
- Visual Testing
- Screen shots: full desktop, selenium. PageSource saving
- Verify-asserts without stop tests
- Downloading files
- Helpers
- Override browser profile preferences, install browser extensions, Headless mode
- Debugging Test.Automation framework
- Logging
- Performance measures
- Webdriver Extends
- More common locators
- Selenium-Grid-support
- Advanced Browser Capabilities and Options
- AngularJS synchronization
- Update App.config or appsettings.json
- Cross browser parallel test execution with testing-Cloud-Providers\SeleniumGrid
- Verifying Javascript Errors from browser
- Enabling Performance Log for Chrome
- Azure DevOps Support
- Edge browser Support
- Downloading and running Selenium Grid with Powershell
- Run Ocaramba tests with Docker container
- HTTP auth in Internet explorer
- ExtentReports Support