You need to include a percentage (%) sign in a Google search as part of your Scenario. Although the percentage sign is a reserved character in ScenarioBuilder, there is a solution.
ScenarioBuilder uses the percentage sign to designate a “Scenario Parameter” value. For example, a login script may use the Scenario Parameter %user% to sign in various user accounts to an application. So what if you need to use the percentage sign as something literal in your scenario? The following example shows a misinterpretation of a percentage sign. The intent is to enter the term “iphone%” into the Google search box (adding the percentage sign to the term will expand the result set):
However, ScenarioBuilder returns the following error in the Execution Report:
So ScenarioBuilder thinks that the user has failed to properly frame the Scenario Parameter iphone with percentage signs. Ironically, creating a Scenario Parameter is the solution to this matter!
Click the Scenario Parameters icon in ScenarioBuilder, enter a name for the file and click “Create”:
The Scenario Parameter file is a simple one…one column with two rows. The first row contains the heading “SearchVal”, and the second, the value “iphone%”. Save and close the file.
Next, link the Scenario Parameter file to the scenario by browsing to it in the Scenario Properties pane:
Lastly, in the Type Text properties replace the literal “iphone%” value with the Scenario Parameter %SearchVal%:
Now upon playback, the scenario no longer trips at step number 2. Execution is successful as the search criterion is flawlessly entered into the Google search box.
So remember to use this trick next time ScenarioBuilder misinterprets a reserved character.