Web Spy
OS based Web-GUI [Classic] automation behavior
| Operating System (OS) | Automate mode | Behavior |
|---|---|---|
| Windows / Linux | Web | Detects all web elements. Notes: - If Web Spy [Classic] opens multiple browser windows, it is advisable to switch windows from the Web Spy [Classic] toolbar list as it will automatically display dialogue for confirmation to add a Web Switch Window step. - On the other hand, if you switch to another window manually, it does not show any Switch step creation dialogue, and you will have to add the step manually in the workflow. - Linux supports only Web mode. |
Web Spy [Classic] Toolbar
The compact Web Spy [Classic] Toolbar takes up minimal screen space, helping you easily turn everyday web browsing into automated tasks. As you click and type, the tool actively records your actions to build workflow steps. When you spy on a specific webpage element, the tool opens the Generate Step dialog, which displays Attributes and Step Generation sections. Here, you configure settings as needed and generate the final steps. This straightforward process allow to build reliable web automations quickly without writing into workflow.
See following table for detail understanding on tools.
Shortcut/Hot Keys/Tool icons
All web elements can be detected using Web Spy [Classic]. The following are the available shortcut keys:
| Shortcut Keys / Tools | Description |
|---|---|
| Ctrl + Alt + X | Press to open Web Spy [Classic] pop-up window. Notice the background of the lens, which is orange and signifies that the Web Spy [Classic] is not in active mode. |
| Spy | Click |
| Spying | When enabled, a blue border appears around a web element as you hover over it. Press Right Shift or the backtick (`) key to open the Generate Step dialog with the element details. Update the configuration if needed, then select the Type, Action, and Criteria, and click Generate to add the step to the workflow. |
| Web Record | You can generate and save the workflow with steps using Start and Stop record tool. |
| Start Recording | Click to record actions you performed on web application. Once you start the recording, it understands the mouse and the key actions. It considers every element as windows by default until there is a preference for detecting web application while recording. The GUI Recorder records the following actions. - Click: The recorder automatically detects click type on an actionable elements. - Set/Write a value: Recorder generates the set value step if a user, - Types in a text field or - Performs keyboard action ctrl +v on the text field - Read/Get value: To read the value of a particular element, hover the mouse on that element and press Ctrl + C. Like GUI spy, the recorder handles complex window/frame tree switching activities internally and generates appropriate steps during workflow creation. Note: In some cases, if GUI Recorder fails to highlight/record a few elements, use GUI Spy to generate steps for such element actions. |
| Stop Recording | Click to stop the recording. A Save Recorded Step popup appears with the following two options: - Generate Workflow- Click to generate the workflow with the recorded steps. - Save Journey- Click to save the journey in a selected directory (for example, D:\UserGuide). This saves the files in .json format. Open the saved .json file and verify that it contains all possible XPaths for each recorded element. |
| Refresh | To reload the web page. |
| Start Highlighting | Click to highlight the selection and resume spying. On a browser, specifically IE, if the page is changed by some actions the highlighting stops. Therefore, to resume spying, click the highlight icon on toolbar to start highlighting the elements again and continue spying. |
| Legacy Web Spy Frames | Important: Frame switching is automatic. Frame tree button should only be used in case of spy is not able to extract/highlight elements from a particular frame. In case you need to use Frames follow the steps: 1. If you want to spy on element which is contained in a frame, then you need to switch to that frame. To do that you need to click on the frame icon on Web Spy [Classic] toolbar. It opens a dialog with frame tree where you can select any frame to which you want to switch. 2. The Frame icon is highlighted in the screen below. Click the Frame icon. 3. The Frame Tree for the current window appears. 4. Let us now GUI Spy the following URL - https://automationedge.com 5. When the page is initialized the first time and all components are loaded. 6. Click on the Frames icon ( 7. GUI Spy can detect any number of frames. If the page contains frames a Frame Tree window appears. 8. Select any frame to which you want to switch. 9. Click on "Main Page" to expand the tree. Click on the nodes to expand the hierarchy. 10. Select a parent frame and a child frame underneath, and then hover over any frame element. In case web elements are not highlighted on hover click Spy (Spy button turns from orange to white) and then hover the mouse pointer to highlight elements. 11. The following snapshot displays the expanded frame hierarchy. In the example below we are on Frame#0 under Main Page. The frame is highlighted in a green box as seen in the snapshot below. Note: If you switch to frame, spying on that will start automatically. To be able to spy on rest of the document select Main page from tree; you additionally need to manually add the Web Switch Frame step with the Locate By Default option. As soon as you select another frame spying from first frame stops. |
| Get Source | Download the source code of the current page using the Source icon on the Web Spy [Classic] toolbar. Click the Get Source icon on Web Spy [Classic]. |
| Locate Element | Locate Element locates an element on the web page based on an element attribute value. |
| Navigate to URL | While spying element on a web page, if there is a need to navigate to another URL, use the Navigate to URL icon. |
| Close Web Spy [Classic] | Close the Web Spy [Classic]. |
| Move the toolbar as required. |
Web Spy [Classic]: Limitations and Known Issues Limitations:
- Web Spy [Classic] does not yet support alerts.
- On Linux you need to manually add switch window step as there’s no desktop support.
- If a Link Text element locator contains the “&” sign, it shows it as &, so correct it before locating elements. Known Issues:
- Microsoft Edge browser cannot automate/spy select dropdown elements.
- Inside a frame, on a page, if we click a link that takes us to another page; on the second page, if Web Spy [Classic] does not highlight elements, toggle Web Spy [Classic] and highlight them.