Posted by
SmartBear
on
Tuesday, August 03, 2010
While TestComplete officially supports web testing in Microsoft Internet Explorer, Mozilla Firefox, Netscape Navigator and any browser based on the Microsoft WebBrowser control, you can also use it to simulate mouse clicks and keystrokes over web pages that are displayed in the Safari browser.
If you are web testing in Safari, TestComplete allows you to access web page elements through its Microsoft Active Accessibility (MSAA) Support plug-in. All you have to do is modify the MSAA settings of your project:
-
Right-click your project in the Project Explorer panel and select Edit | Properties from the ensuing context menu. This will open the project properties for editing.
-
In the editor, select Open Applications | MSAA from the tree on the left. This will open the MSAA properties dialog.
-
Add two class names: SearchableWebView and WebViewWindowClass to the List of accepted windows table. For this purpose click Add and enter the class names to the edit boxes.

Make sure that the appropriate check boxes are selected.
-
Select File | Save from TestComplete’s main menu to save the changes.
Now TestComplete can recognize the elements of the pages displayed in Safari. To check this, open a web page in Safari and switch to the TestComplete Object Browser:

As you can see, TestComplete has access to web page elements. It displays the hierarchy of elements on the page in the Object Browser.
Note that the MSAA technology does not support HTML properties like innerText, style, id and some others. By using this approach, you can create simple web tests that simulate clicks or keystrokes.
If you are interested in trying web testing with TestComplete, download and try TestComplete for free.