0

I am executing my selenium script using Selenium/WebDriver sampler and after the execution of multiple threads, it has been only showing the overall results for each user. But I want to know the particular time taken by a particular URL that is moving from one to another mapping that I have written in my Selenium Script. Currently, it is showing like this :

enter image description here

My Jmeter test Plan:

enter image description here

My requirement is to get each URL report as well for the particular Agent which we are navigated with the help Selenium Script. How can I do like in this way? Can anyone please help me that I have already done a lot of R&D to get this but didn't get any solution for this.


1
  1. You can get the current URL using WDS.browser.getCurrentUrl() function
  2. You can set the desired Sampler title using WDS.sampleResult.setSampleLabel() function
  3. You can access JMeter Variables using WDS.vars shorthand

Assuming all above you can dynamically build the names for your Samplers using the following expression:

WDS.sampleResult.setSampleLabel('Agent: ' + WDS.vars.get('USERNAME') + ' :: Customer: ' + WDS.vars.get('MSISDN') + ' :: URL: ' + WDS.browser.getCurrentUrl())

More information: The WebDriver Sampler: Your Top 10 Questions Answered

| improve this answer | |
  • So for achieve different URL requests after every click, What should I have to do? Should I have to use the different selenium web driver samplers for every click? – Rajan Apr 20 at 9:45
  • 1
    Whenever you call this function it will update the current WebDriver Sampler with the current browser's URL, if you need to save each url - you need to use a separate Sampler for each action – Dmitri T Apr 20 at 9:49
  • Yes, I want a result like Http requests where we get all the results according to the URL. Now I think I should achieve as you said above to use the separate sampler for each action. – Rajan Apr 20 at 9:58

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.