Web Click and Script - Tips and Tricks
Overview of Web Click and Script Protocol
- With Web (Click and Script) you will save valuable scripting time. The easy-to-use script eliminates the need for correlation.
- New intuitive API functions describe user actions on Web objects (button, text link etc.).
- In tree view, the steps are grouped according to their pages.
- In snapshot viewer, the object corresponding to the active step is highlighted.
- Can create a Business Process Report (Microsoft Word format) summarizing the VuGen script.
- The LoadRunner QuickStart contains an appendix illustrating the new Web (Click and Script) features. Access the QuickStart from the Windows Start menu Mercury LoadRunner > QuickStart.
VuGen Version and Requirement
VuGen 8.1 FP2 and above
Supported browser: Only Internet Explorer 6
Supported Operating Systems: WinXP/2000/NT (not Win2003)
GUI Properties tab is related with the new features available in Web Click and Script.
Breakdown of Recording options available under GUI Properties -> Advanced
Enable out of context recording: VuGen does not natively support the recording of ActiveX controls and Java applets. You can instruct VuGen to create a URL-based script for ActiveX controls and Java applets, so that they will be replayed. Since these functions are not part of the native recording, they are referred to as out-of-context recording (enabled by default).
Record rendering: Record the values of the rendering-related properties of DOM objects (e.g. offsetTop), so that they can be used during replay. Note that this may significantly decrease the replay speed. (disabled by default).
Record `click’ by mouse events: Record mouse clicks by capturing mouse events instead of capturing the click () method. Enable when the recorded application uses the DOM click () method, which may result in generating multiple script functions for the same user action. (enabled by default)
Web Event Configuration: Changing the settings under this recording option will affect how sensitive VuGen is to capturing events when navigating a webpage. When moving the mouse over an image on a webpage, the web event configuration decides whether to record this as an event or to record an event only when a mouse click occurs.
Choosing the “High” Web Event configuration option slows down the recording and could also result in some events being captured twice. This setting should be used when events that are expected are not captured.
Choosing the “Basic” Web Event configuration option is the fastest. This setting should be used unless certain expected events are not captured.
For more detailed information on custom web event configuration, please click on the Help button on the Web Event Configuration box.
- Use the mouse and not the keyboard as far as possible
- To capture events, work only on browser windows opened by VuGen
- Wait until the page loads completely before going on to the next step of the business process
- Always start recording on a new script. Do not record over an existing script
- Avoid using context menus i.e. menus which pop up when clicking an item in a GUI
- DO NOT reorder functions or move them from one section of the script to another
- Records and emulates on Internet Explorer version 6 only
- Does not support recoding on Windows 2003
- Does not support VBScript and Applets
- Does not support user actions on ActiveX objects and Macromedia Flash
- Supports only English language applications
- Scalability is lower than the Web HTML protocol
- Replay snapshots may differ slightly from the actual Web page
- Modal Dialogs are not supported
- The automatic generation of web_reg_find statements for page titles does not work in Web Click and Script. Workaround is to manually add the web_reg_find after the script has been recorded
Tips and Tricks
- When the HTML contains code such as Offsettop or Offsetleft (which are properties used to give the coordinates of the element) : Enable record rendering related property values under Recording Options -> GUI Properties -> Advanced
- To record “mouse over”, “mouse down” events on a webpage : Change the Web Event Configuration to High under Recording Options -> GUI Properties -> Web Event Configuration
- If the script continually fails on a particular step: Try replacing that step with Alternative Navigation. Right click on that step and choose “Replace with alternative navigation” on the menu that comes up
- If a “Button Not Found” error is seen: Check to see if the value in the script is the same as that reported in the replay log. If not, replace the value in the script by that reported in the replay log