...
Once the above dictionary has been defined, the Selenium scripting command getDictionary
allows access to the dictionary information from inside a check scenario script. The getDictionary
command fetches the entire Dictionary (with all key/value pairs) and stores it locally for when the script executes. It uses the Apica Dictionaries GET API to get these dictionary values. The GET call will be in the form of
https://api-wpmasm1.apicasystemapica.comio/v3/scenarios/proxysniffer/dictionaries/{dictionary_key}?auth_ticket={auth ticket value}
...
Target: The user’s API Token/Authorization Ticket
Value: The dictionary URL
https://api-asm-wpmeu1.apicasystemapica.comio/v3/scenarios/proxysniffer/dictionaries/{dictionary_key}
The following screenshot provides an example of getDictionary
usage within a Selenium script:
...
Command | Target | Value |
---|---|---|
|
|
|
Step | Screenshot |
---|---|
This screenshot provides an example of the API GET command for the dictionary “DougApicaKey”. | |
This screenshot provides another example of the API GET command for the dictionary “ApicaKey”. Note how each dictionary has different defined key-value pairs. | |
Selenium Example 1: The Dictionary Key "DougApicaKey" has 3 key values (excluding the sample value) that are used in the scenario. | |
Selenium Example 2: The Dictionary Key "Apicakey" has 2 key values (excluding the sampleKey value) that are used in this scenario. In this case, the username and password values, from the dictionary will be used in the Selenium scenario. These values will not be hard-coded into the script. |