-1

For example: My login page is taking time to load so, I want request breakdown for this page to know which request is more take time.

Not getting any solution for it.

1 Answers1

0

You won't be able to "get any solution" for it for the WebDriver Sampler

It's possible on Selenium level but you will need to set a special capability prior to starting the WebDriver instance: LoggingPreferences

Then you will be able to access the outgoing and incoming requests list using Logs class instance

Example Groovy code you could use in the JSR223 Sampler:

def options = new org.openqa.selenium.chrome.ChromeOptions()
def logPrefs = new org.openqa.selenium.logging.LoggingPreferences()
logPrefs.enable(org.openqa.selenium.logging.LogType.PERFORMANCE, java.util.logging.Level.ALL);
options.setCapability('goog:loggingPrefs', logPrefs)

def driver = new org.openqa.selenium.chrome.ChromeDriver(options)

driver.get('https://jmeter.apache.org')

List<org.openqa.selenium.logging.LogEntry> entries = driver.manage().logs().get('performance').getAll()

//do what you need here

driver.quit()
Dmitri T
  • 159,985
  • 5
  • 83
  • 133