- An action works for one record and does not work for the next
- An action causes an error in which The target could not be found
- Handling Warning Messages in Navigator
- Text
- Name
- ID
- Class
- Url
- Bridge
- Table
- Parents
- Use an Exact Match to locate the target
- Use a Best Match to locate the target
- Use Left or Right Match to locate the target
- Ignore this rule
- Use Best Left or Best Right Match to locate the target (for Frame targets only)
Foxtrot Rules
Consider the tables below:
Name |
Description |
Example |
Use |
Availability |
---|---|---|---|---|
Text |
This text displayed on a targeted item. |
When targeting a button that reads Go, the Target Caption is Go. |
Assists Foxtrot in locating a target. |
Web, Windows |
Name |
A unique name assigned to the targeted element. This is assigned by the author of the application or web page. |
A developer may assign the name 'button123' to an element (button, link, image, etc...) in order to define its uniqueness. |
Additional information Foxtrot uses to better locate a target. |
Web, Windows |
ID |
A unique ID assigned to the targeted element. This ID is assigned by the author of the application or web page. |
A developer may assign the ID '123456789' to an element (button, link, image, etc...) in order to define its uniqueness. |
Additional information Foxtrot uses to better locate a target. |
Web, Windows |
Class |
A class can be assigned to the element by the author of the web page. |
A developer may assign the class 'button' to an element (button, link, image, etc...) in order to define what type of element it is. |
Additional information Foxtrot uses to better locate a target. |
Web |
URL |
The URL of a webpage, assigned by the author when the page is built and published. |
The URL 'www.google.com' is associated with a specific webpage. |
Additional information Foxtrot uses to better locate a target. |
Web |
Bridge |
Bridge gives the highlight permission to jump to the next neighboring table (below or above it) as long as that table appears to be related. |
Two tables might be a part of one table. Turning Bridge on allows jumping between the two tables. |
Avoid building a more complex solution. |
Web |
Table |
The column headers for the table that the target is in. |
There could be two elements with the same attributes but the tables that the elements are a part of are different. |
Assist Foxtrot in locating a target in a table. |
Web, Windows |
Parents |
The rules of the parent, the element that the target is in. |
There could be two identical elements in a window where the difference between the two is the attributes of the parent element. |
Assist Foxtrot in locating a target in Windows applications. |
Web, Windows |
Target Example
Let us have a look at a web table as an example containing currency rates from this website:
To properly engage with this whole table, you should drag-and-drop to the first cell in the web table, in this case, the first "Currency" in the top right corner like this:
To switch to work with the full web table, we can click on the grey arrows and select "Web".
Now, to have a closer look at the Rules of the target, we can click on "Rules":
These are the rules of the target:
These are the options:
- Text: This is the first option that may be visible and therefore configurable. "Text" displays the actual text of the object that has been targeted. When Targeting the cell ‘Currency’ above, Foxtrot will use the literal text of the target, Currency, to assist in locating the target. In this case, we can assume that the text of the target will remain the same, unless, for example, the language of the website changes, but that is probably unlikely. Therefore, the option "Exact Match" seems appropriate. If this value were to change on a record-to-record basis, it may be helpful to select "Ignore" from the drop down to the left of the field. For example, when clicking a “Submit” button, it may not be necessary to alter the option, as this text will not likely change, However, when clicking or copying something unique like a date, an SSN, or a phone number, it may be necessary to ignore the "Text" by selecting "Ignore" in the drop down to the left of the field, as we do not want to match something that could be dynamic. Additionally, you can use Tokens as your Target Caption by clicking the magic wand along the right.
- Name & ID: The Name and ID are a unique name & ID assigned to an object. This value typically does not need to be changed. In this case, they are both blank, which is not necessarily a problem, that just indicates that the developer of the website did not assign a name or ID to the element on the page.
- Class: The Class is also an assigned property to an object. Typically, Foxtrot will by default set this to "Ignore" as classes can change more frequently than name and ID. In this case, the class is empty, and if you can expect it to remain blank, it is actually a good idea to set it to "Exact Match". The more precise you set the rules, the faster and more reliably Foxtrot will locate it and perform the action.
- URL: The URL is the URL of the website at the moment of targeting the element. This primarily acts as a help for Foxtrot to find the appropriate browser window to engage with in case that multiple browser windows are opened. But, you also have to be aware of this rule in case that it is dynamic. For example, in this target, you can see that Foxtrot will match the first 76 characters from the left, which is absolutely fine as the URL of the target is stable: "http://www.nationalbanken.dk/en/statistics/exchange_rates/Pages/default.aspx". But, imagine that you have a URL that includes an ID or something else making it dynamic. If this URL was: "http://www.nationalbanken.dk/en/statistics/exchange_rates/Pages/default/20042019.aspx" with a date. In that case, you need to make sure that you do NOT include that part of the URL in the number of characters of the "Left Match" rules.
- Bridge: This determines whether Foxtrot will engage with ONLY the targeted table or also look for any other tables on the page with the same column structure. It is turned off by default. On this website, we actually have two identical tables containing two sets of currency rates. If you wish to, for example, load the data from both web tables into a list, you can set "Bridge" to "Yes" and use the Get List action to load the data from not only the targeted table but from the second one as well.
- Table: When targeting a web table, you may see options for "Table". In this example, targeting the cell ‘Currency’, will display options for a "Table". Here, you can manage how Foxtrot should find the actual table containing the element that you targeted. When targeting your browser, you may see 1, 3, 4, even 10 tables or parent tables. When this happens, it is attributed to the fact that you have targeted a table that is a child of another table; or a table within a table. This option will display any table headers associated with the target table and its parents. Depending on the structure of the table, it may be necessary to adjust the Column Captions. In this example, 2 columns names were set to Ignore by Foxtrot. It might not always be the case, in some cases, you will need to adjust the rules by yourself depending on the logic you are building.
Comments
0 comments
Please sign in to leave a comment.