O'Reilly logo

Advanced UFT 12 for Test Engineers Cookbook by Jonathon Lee Wright, Meir Bar-Tal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Drawing a rectangle on the screen with Win32 API methods (Extern)

In this recipe, you will also see an example of how to use the Extern reserved object to define references to methods in external DLLs such as those of the Win32 API. These methods can then be loaded and executed during runtime. We have already seen an example of this in the Reading values from an INI file recipe in Chapter 1, Data-driven Tests. Here, we will learn how to implement a function that draws a rectangle on the screen with the color of your choice. This is useful to mark areas on the screen that are of interest (especially when the test fails) and hence, makes the report analysis task more efficient.

Getting ready

From the File menu, navigate to New | Test, or use the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required