Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2021.1

...

Note

You can also extract path elements from within your Web browser WHILE you are recording a path. To do so, right-click an element from within your browser and select Configure Validations from the shortcut menu. The Validation Options dialog displays. The options within this dialog will be the same as the options in the Browser Contents Viewer tool tool  that appears AFTER a path has been recorded and replayed at least once.

...

  1. Right-click the page element whose value you want to validate or store (for example, right-click a link), and choose Extract Value from <element> Element… from the shortcut menu.
  2. In the wizard that opens, ensure that  the desired element is selected in the Property name box.
  3. If you want to "zoom in" on the value to extract, complete the isolate partial value wizard page. If you want to validate or store the entire string, you can ignore this.
    • Sometimes you may only want to validate or send a portion of a property value to a data source.  If this is the case, you can isolate the part of the property value to use by selecting the Isolate Partial Value using Text Boundaries check box. You then enter Left-hand and Right-hand text that serve as boundaries for the value that you enter. The preview pane shows you what value will be used based on the boundary values that you have entered. For example, assume that the property value is "Click here to log in”:
      • To isolate the value “Click”, leave the left boundary blank and enter “ here” (including the space) in the right boundary.
      • To isolate the value “here”, enter “Click “ in the left boundary and “to” in the right boundary (again including spaces).
      • To isolate the value “in”, enter “log “ (including the space) as the left boundary and leave the right boundary blank.
  4. To validate a value:
    1. Select Validate the value.
    2. Choose from the following expected value options:
      • equals: Validates that the property value exactly matches the expected value.
      • does not equal: Validates that the property value does not match the specified value.
      • contains: Validates that the property value contains the expected value somewhere within it.
      • starts with: Validates that the property value starts with the expected value.
      • ends with: Validates that the property value ends with the expected value.
      • is less than: Validates that the property value is less than the specified value.
      • is greater than: Validates that the property value is greater than the specified value.
      • is not present: Validates that the specified property does NOT appear on the page, and will report an error if it does. This is useful for cases when a web application is showing an error message that it should not be.
      • matches color: Validates that the color values correspond to names of colors specified in the validation colors mapping file. See Validating Color Elements for details.
    3. Choose Fixed, Parameterized, or Scripted, then specify a value.
      • If the Parameterized option is chosen, then you can specify a column name from that data source.  When the scenario is played back, the expected value will be taken from the appropriate row and column in the data source. Column names will only be shown for one data source, so if you have multiple data sources in your project, you will need to go to the chained Browser Validation tool and modify the data source being used at the top of that panel. If other extracted column names are available because they were set up by extracting from a different HTML page, they will also be in the list of available column names, even if the project does not define a data source.
  5. To send the value of the selected property to a data source (so that the value can be used later in another scenario or in another tool):
    1. Select Extract the value to a data bank.
    2. Specify which data source column you want to contain the extracted value.
      Custom column name: Tells SOAtest the name of the data source column in which to store the value. Values are stored in an internal data source unless you specify otherwise (for examplee.g., if you select Writable data source column or Variable). This is the name you will use to reference the value in other places. For example, if it is stored in a data source column named My Value, you would choose My Value as the parameterized value. You could also reference it as ${My Value} in literal or multiple response views.



      Writable data source column: Tells SOAtest to store the value in a writable data source column (seeConfiguring a Writable Data Source for details). This allows you to store an array of values. Other tools can then iterate over the stored values.

      Write to all columns that match: Tells SOAtest to store the value in all columns whose name contains the given string. When extracting multiple values from a message, each value will be written across all the columns that match. In contrast, if you pick a single writable data source column (the above option), then the values will be written down the column across multiple rows.

      Variable: Tells SOAtestto save the value in the specified  variable so it can be reused across the current test suite. The variable must already be added to the current test suite as described inDefining Variables. Any values set in this manner will override any local variable values specified in the test suite properties panel.

      When the scenario step is executed, the property value will be extracted from the page and placed into a temporary data source within a column with the specified name.  When later parts of the scenario reference the column name, the value stored in the temporary data source will be used for those scenario steps.  You can both validate and send a property value to a data source at the same time if desired.
  6. Click Finish.

...