Create a scenario that will allow the same actions to be performed on 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 which 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 name the scenario: SearchingBooks
2. Click Manual Scripting
3. Add an "Open URL" action
and type in "www.amazon.com" in the properties section.
4. Add a "Find Image" action
and click the + sign on the properties window to add Images.
Note: Right clicking "No image data" and click "Capture Image" 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 "Mouse Move and Click" action
6. Add a "Click On Image" action
and capture Books from the "All" drop-down list as shown below.
Tip: 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 "Function Keys" action
and press Enter key.
8. Add 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 the data.
Once you are done, click OK.
The properties window should look like this:
10. Go to Home menu and click "Capture Additional Images"
to initialize capturing images that will be used as variables.
For this scenario, it will be these images below with the following filenames.
11. Add a "Find Image" action and put it as a child action for the Loop.
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.
12. Complete the scenario by adding the following steps as shown below: