This script uses ScenarioBuilder actions to accurately display the details of a website.
  • Ping
  • DNS lookup
  • Page load time
  • Search time

Use case:

We want to follow up or document reference time of certain indicators of a website, using Google.com for this use case scenario.
Using Begin Transaction/End Transaction action before and after steps where command lines are called to ping or to measure DNS lookup of google. When running the command line to ping/DNS lookup it usually takes more of time for the command to run than the real ping/DNsLookup time, to accurately display the correct time, a regular expression is set on each Run command to read the execution results and put it in each of the variables dnstime & pingtime which are set after the run command action (Step3/Step7).

 

Command: ping google.com

 

Command: powershell.exe “Measure-Command { nslookup www.google.com
2> $null }” | FINDSTR “^Milliseconds”

 

Variables properties: Variable Value is set to Variable rendered by Regular express in command line.

As for siteload transaction, Open URL action to open Google.com website then Resize* (1246/749) MS edge window to have full visibility over the browser window and look for “About” in the displayed page using action “Find Image in active window” to confirm google main page has loaded.

 

*Resize window properties

 

To measure the search time in google.com we’ll use Automai Corporation as search word, by typing it in search area using Type Text action (step14) then press enter to start the search, that’s when we begin the transaction to measure the search time and to mark the end of the search, we use the action Wait Image in active window to disappear which allow us to wait for a certain image to disappear before resuming, in our case loupe image which indicates the search is still ongoing the mark the end of the transaction for search time and close MS Edge browser using Close window action to close a designated open window.

 

How to install this automation