Regex in BrowserMob Scripts

If you’re using an RBU or VU you may need to extract content from the previous response. For example, enumerate a link to a PDF file for subsequent download.

The BrowserMob interface has a handy findRegexMatches method you can call as follows:

var link = browserMob.findRegexMatches(selenium.getHtmlSource(), ‘href="(.+?pdf)"’);
browserMob.beginStep("16_download_content");
browser.get(link[0], 200);
browserMob.endStep();

It takes a string input and [...]

Emulating Think Time and Pacing with BrowserMob

If you come from the commercial toolset mindset, you might be interested in how we achieve think time and pacing when using alternatives such as BrowserMob.

Think Time
Think time, is normally defined as the amount of time a virtual user ‘thinks’ between individual steps within a transaction. This time is usually excluded from response time measurements [...]