To create a scenario that will allow the same actions to be performed to multiple items by using the image names as a variable within the Image Action. Doing so will also result in a scenario that will be easier to maintain and organize.
Create a scenario that will utilize a Find Image action that will use a variable in a CSV file. The values of that variable will be the existing image file names. Pairing this technique with a loop action will enable the scenario to perform the same process on multiple items.
Using this technique, the example scenario below will navigate through multiple sub-categories of Books at Amazon website.
1. Create a Scenario by clicking "New." And call this scenario SearchingBooks
2. Click Manual Scripting
3. Add actions and type in "www.amazon.com" in the properties section.
4. Insert an action "Find Image" and on the properties window click the + sign to add Images.
Note: Right clicking "No image data" and click will minimize ScenarioBuilder and starts
capturing the background web browser which is already pointed to Amazon's website and capture the same image from the above image.
5. Add a
6. Add a and capture Books from the "All" drop down list as shown below.
Important: Use the same procedure on step 4, press [CTRL] once so you can select the "All" drop down list. Once the list looks exactly from above press [CTRL] again to activate capturing. After you have captured Books image, go back to your web browser and select Books, from the "All" drop down menu, and click on Books search bar to activate a prompt and press ENTER on your keyboard.
7. Add a
8. Create a Loop action.
Note: The iterations properties will depend on how many images you will create.
9. Click on the Ellipsis ••• in Variable File Name to enter data in the Scenario and Component Parameters.
See the example data below, when done click OK button.
The properties window should look like this:
10. Find and click on Home tab to initialize capturing images that will be used as variables.
For this scenario it will be these images below with the following filenames.
11. Click and in the properties right click "Find Image #1" then click on Choose a variable" as shown below. Select Variable window opens and type the Variable name "BrowseBooks" and then click OK button.
a. Choose a variable
b. Declare variable name BrowseBooks
12. Finish the scenario script as shown below: