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 [...]
