Tag Archive: Web

Aug 27 2014

Calculating Page Size in Pixels

This short post describes a handy way to calculate the page size in pixels. The steps: The function GetPageNumPixels accepts a Page test object and calls the function GetDocumentElement. The function GetDocumentElement accepts the same Page object and retrieves, via the Object property, the documentElement for either a Page that is standards-compatible or not. The …

Continue reading »

Feb 06 2014

Check if Page has Scrollbars

Being able to know whether the current web page has a horizontal or vertical scrollbar (or both) can be handy. The following function GetScrollbarState accepts two arguments: The  document (i.e., Browser(“MyBrowser”).Page(“MyPage”).Object) The direction of the scrollbar – “h” for horizontal or “v”” for vertical. And returns true if there is a scrollbar in the given …

Continue reading »

Apr 19 2009

Effectively Delete Cookies

Andrew Marin has shared the following QTip, which allows us to quickly and effectively delete all cookies in Internet Explorer.
This can be of great help to anyone who handles multiple user sessions during his tests, or just wants to reset the test environment before starting a test run.

Mar 26 2009

A Survey

Ayal Cohen – the functional architect of QTP in HP Software R&D – would like you to spend a few minutes answering a short survey. It would allow HP to design better, more relevant versions of QTP, that will benefit us all.

We thank Ayal for his efforts to help and serve the QTP community, as well as for approaching AdvancedQTP’s worldwide community in this endeavor. In behalf of the AdvancedQTP team – Please go ahead and answer the survey.

Jul 12 2008

Saving a File from Internet Explorer

Anshoo Arora has a great QTip for saving a file via Internet Explorer. This will produce similar results to manually right-clicking a link and choosing “Save as”: ‘Simulate a web query Set WinHttp = CreateObject(“WinHttp.WinHttpRequest.5.1”) If WinHttp Is Nothing Then Set WinHttp = CreateObject(“WinHttp.WinHttpRequest”) WinHttp.Open “GET”, “http://www.website.com/Documnet_i_want_to_save.pdf”, False WinHttp.Send ‘Get the response arrArray = WinHttp.ResponseBody …

Continue reading »

May 27 2008

Reusing Web Objects after the Page Reloads

Will Roden from the Software Inquisition writes about a major undocumented feature in QTP, which could potentially allow you to write far more elegant test than though possible to date. One of the more frustrating limitations of QTP web test objects was that they went out of sync whenever the webpage reloaded. This means that …

Continue reading »

Apr 23 2008


Firebug is the most advanced free web analysis tool to date. While some of its functionality may resemble IE development toolbar (reviewed here), its scope, extra features and attention to details make it invaluable both to QA personal and web-designers. It’s fair to say that the only advantage IE development toolbar has over Firebug, is …

Continue reading »

Apr 11 2008

Get a WebElement’s Style

While some of a WebElement’s style properties are available via it’s Test-Object properties (e.g. its height, visibility etc.), a lot of its visual styling is left unknown to QTP. This can be overcome via its Runtime .CurrentStyle property. For example, this WebElement is the welcome header of AdvancedQTP’s main page: ‘Grabe the WebElement Set oWebElement …

Continue reading »

Apr 02 2008

Internet Explorer Developer Toolbar

The Microsoft Internet Explorer Developer Toolbar provides a variety of tools for quickly creating, understanding, and troubleshooting Web pages. a Must tool for QTP Web users. Overview The Internet Explorer Developer Toolbar provides several features for exploring and understanding Web pages. These features enable you to: Explore and modify the document object model (DOM) of …

Continue reading »