Pages

Tuesday, November 13, 2012

Quick Test Professional (QTP) - WebUtil Object

This provides and undocumented method to delete browser cookies:

'Delete cookies
WebUtil.DeleteCookies

NOTE: The WebUtil object is implicitly available after installing QTP Plus, and it can be explicitly instantiated using the following statement:

'Create the WebUtil object
Set WebUtil = CreateObject("Mercury.GUI_WebUtil")

'Delete cookies and destroy the object
oWebUtil.DeleteCookies
Set oWebUtil = Nothing

No comments:

Post a Comment