Are you getting an error that says ""Extractor could not locate content on page for variable xxxxx".?  It may be due to a dynamic variable that hasn't been configured. The "ASM" feature automatically looks for dynamic variables and configures everything for you, but if your application uses a unique technique, then it will have to be configured by hand.  You can react to test case errors and work backwards, but it is usually easier to proactively search for fields that haven't been configured and write dynamic variable detector rules that will work on all of your test cases.  Why aren't some dynamic variables detected?  The most common situation is a "creative" use of HTML that is not in common usage.  The more clever the programming, the harder a web-based application is to test.


This is a big topic, and can take a lot of effort to master, but here is a quick overview of the process.  If you are faced with something complex we are available on a consulting basis to configure everything for you.


1. Find Un-configured Fields


The first step is to click on the top level in the Test Case Editor to select all web pages, and then select the Fields Tab.  (See attached screenshot)  In the Datasource column, grayed out entries have been automatically configured, while blank entries are not configured at all.  Look for entries that appear to be dynamically generated, i.e. long strings or UUIDs or numbers that will change with each session.  Those are the ones you want to configure.



2. Search for Recorded Value


Double click on the un-configured field and copy the recorded value.  Click on the search tab to find the page and transaction that field appears in.  You can then select that page and transaction, and switch to the Content View.  Use the search feature in the content view and the Text display mode to identify the HTML that isn't being detected automatically.



3. Design Extractor


You can use the page-specific validator dialog to configure a validator since its interactive, and then recreate that later in the Detection Rules Dialog to apply to all pages and all test cases.  


Click on the Actors Tab, and then sector Extractors at the bottom of that window.  Hit the green "+" symbol on the right-hand side to create a new extractor.


First, use the recorded value to locate the HTML again.  A blue line will appear on the right-hand HTML display to indicate where the string occurs.  Click on each blue marker until you find the source of the dynamic variable. 


Regular expressions are preferred since they allow you to only accept values in the right format, ignoring all others.  See the screenshot for a configuration example for the UUID "choiceId".  


Copy the regular expression that works and click on Cancel.



4. Create a Detection Rule


Open the Detection Rule Dialog using shift-control-U.


Create a new dialog by copying a similar rule or creating one from scratch.  Note that there are detailed instructions of detector rules in the manual, OR you can schedule a training session to learn everything you need at one go.


See the attached screen for a detector rule designed to pick up values in the HTML snippet: "choiceId="aaa-bbb-999-222".  The regular expression is "choiceId="([0-9a-zA-Z-]++)", noting that it does not specifically look for UUIDs, which is beyond the scope of this document.



5. Apply the new Detection Rule


Click OK, and you have the option of applying the new rule to every test case.  Many times that takes too long, so you should right-click on the test case you're working on and select Configuration->Application State.


6. Check the Fields View to Verify 


Once the new detection rule has been applied, you should revisit the Fields View to make sure an extractor has been automatically applied.  As you can see below the "choiceId" field has been configured: