DefinePageName

This action allows defining an alternate page name for a HTML page. The recorder generates various strings (page timer name, name of stored context variable, ...) based on the name of a HTML page. By default the recorder uses the title of an HTML page for the page name, or "Unnamed page" if no title exists.

Such a rule must have conditions which:
  • return true
  • save a non-empty string to the variable PageName (by means of the tag SaveAs of a condition)

The conditions have access to the default page name the recorder would use through the variable DefaultPageName.

The following example checks if the default page name does not exist (the recorder would use "Unnamed page" then), and defines the page name to be the URL of the HTTP document instead, if it is at least 3 characters long.

<HttpScriptingRule>
  <Name>Define Page Name</Name>
  <Active>true</Active>
  <Action>DefinePageName</Action>
  <Conditions>
    <Not>
      <Exists>
        <ApplyTo>DefaultPageName</ApplyTo>
      </Exists>
    </Not>
    <CheckRange>
      <ApplyTo>Http.Initial.Request.Url</ApplyTo>
      <Range>3-</Range>
      <SaveAs>PageName</SaveAs>
      <SaveMode>Replace</SaveMode>
    </CheckRange>
  </Conditions>
</HttpScriptingRule>