Debug a Vugen script using developer tools.

Whenever the application under test is upgraded with latest code which may have UI changes (like few elements in the page might be removed or added or modified) or in other words
the requests would have been modified or added or removed, there are high chances that our vugen script might not work.

To debug scripts of these kind we can use developer tools instead of re-recording the whole script as this approach saves a lot of time.


  • After launching the browser press F12 to open the developer tools.


  • All the requests sent from the client (browser) to server will be captured under the Network Tab in developer tools.


  • Launch the application and capture the request which fails in the script in the developer tool.


  • When you click on the request you can see Headers Tab which holds all the information about the request like Request URL, Request Method, Request Headers & Form Data.


  • From data is the section where the request parameters are passed on. Compare this Form data with the Item Data in the script request and look out for changes. If there are differences then update the script with the new form data and run the script, this will more likely resolve the issue.


  • The Image A below shows the login request in the vugen script and the same same request captured in developer tool in Image B (Highlighted in RED box).


Image A
Image B


  • You can clearly see that the parameters under Item data in the script are captured under Form Data in the developer tool.


  • On clicking on the view source (Highlighted in BLUE circle in Image B) we can view the parameters in a way it will be formatted in the request (as shown in Image C), which will be more easy to compare and analyze.



Image C


  • Also we can you the Inspect element option (Highlighted in GREEN circle on the Left top corner in Image B) to debug the scripts. Turn on this option and select any element in the web-page to get the Element ID & Element Value. This way also we can compare & update the Element ID & Element Value (Item Data) in the script.



3 comments: