One needs to use the HTML page to collect the information that is contained in the table and has 4 columns with data.

I figured it out how to use XPath to take a specific value and upload it to CSV.

Now the complexity is such that a site with a table can have 2 or more pages

1 question. how can I scan how many pages and collect the result from each? 2. the question is how can I get the value sequentially for subsequent uploading to CSV.

Before that I used

import java.io.File

File file = new File("C://test/result.csv")

file  <<"\n${computer}"
  • 2
    How is JMeter related to this question? – João Farias Feb 21 '20 at 12:22
  • On assignment, I need to do this through jmeter – Luffy Feb 21 '20 at 13:37

If there is > one page there should be a mechanism for switching the pages and an indicator telling if this page is the last one of there are more pages.

You should be able to figure out the difference between the "next" and the "last" pages and come up with a proper condition for the JMeter's While Controller so you will iterate the pages/table until they're available.

Your way of writing values into a file is fine as long as it's used by 1 thread, when you will have more threads (virtual users) you might run into a race condition which will cause data corruption so I would rather recommend using Flexible File Writer instead.

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.