How to capture interfaces to run cross-browser tests?

Suppose that you need to test the website www.google.com on different types of web browsers: Internet Explorer, Mozilla Firefox and Google Chrome. The unique and stable property you want to use to capture the interface of a webpage is title. Only problem is, each browser appends its own little “plug” to the title of the webpage, as follows:

You may ask: Do I need different interface definitions for each of Internet Explorer, Firefox and Chrome?

Solution: No, you do not need to capture three interface definitions for each browser. Simply use a wildcard ({.*}) to allow for the differences between browsers.

  1. Capturing HTML pages (windows):

    If you have captured the interface definition of the webpage on one browser (e.g., Internet Explorer), just replace the non-common text with the wildcard {.*}, with the following steps:

    1. Open the interface definition of this webpage.

    2. Focus on the row interface element setting and change Google - Windows Internet Explorer to {Google.*}.

    3. Click Save on the toolbar. If you did not yet capture the interface for the webpage, and you want to make your interface definition generic enough to use across browsers, here’s another approach:

    4. Open the Interface Viewer and, in the UI explorer, select the node for the browser displaying www.google.com.

    5. In the Properties tab, observe the title property.

    6. Double-click title’s Value field, and then change the Value into, for this example, {Google .*} to match any HTML page (window) whose string starts with Google.

    7. Click Save on the Interface Viewer.

  2. Capturing controls:

    We recommend that you capture interface elements with stable and unique properties across browsers, such as name, id, etc.

    • If the unique properties are slightly different on different browsers, use the wildcard ({.*}) , as discussed above.
    • If the unique properties do not have same or similar values across browsers, you can use Variations. Refer to Variations to learn how to create a variation and run the same test modules across different browsers/platforms.

ヒント: 
In order to launch a specific browser from your test, use the use browser built-in setting.


Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGearはLogiGear Corporationの登録商標であり、Action Based TestingおよびTestArchitectはLogiGear Corporationの商標です。ここに記載されているその他の商標は、各所有者の財産です。

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400