title: Use JavaScript to find imported file and read from it
body: <p>I am trying to automate reading the query strings parameters from a file I can see in the network tab on a page. The file always starts with a given pattern, like &quot;pageHome.website.com&quot; and then has a bunch of seemingly random numbers and letters on it.</p>
  <p>I already have Selenium WebDriver with JavaScript opening the page and running some basic tests but I would like to have it find these values as well and I cannot seem to find a way to have it just log the file (especially since I cannot know what the file's name will be). But it can run some JavaScript so I am hoping there is some way to view whatever files are being imported and find one with that matches a given pattern (&quot;pageHome.website.com&quot;).</p>
  <p>If this is not possible, I am happy to try alternative approaches.</p>
  <h2>Edit</h2>
  <p>To clarify what I mean is that on this page a request is sent off for metrics monitoring with a giant encoded string of query string parameters (Ex: <code>pageHome.website.com/subdomains/parameters?ABC=123&amp;XYZ=890</code>). I would like to be able to catch that request and then collect the parameters for testing. I'm trying to do this without actually changing any of the source code so that it can be implemented for tests on other pages.</p>