Identification issues on Browser or Page test objects even though they are properly open/displayed

  • KM02540656
  • 01-Sep-2016
  • 01-Sep-2016

Summary

This document describes scenarios where Browser or Page test objects are not properly identified.

Cause

In Internet Explorer (especially IE11) with UAC and protected mode enabled, when navigating between URL in different security zones, IE replaces the tab process and the browser test object is not always aware of this so it will not communicate with the new process.
Although spying on the browser works fine.

The most common cases are:

  1. After launching a browser using BrowserFactory.Launch successfully, the Browser.Navigate method fails or no object is identified in the home page
  2. After a call to Browser.Navigate method, no object is identified in the navigated page.
  3. After an operation in the AUT (application under test) that caused the browser to navigate to a new page, no object is identified in the navigated page.

Fix

There are multiple possible solutions to this issue:

  1. Make sure that all the web sites that are in the test are in the same security zone. This includes the home address and about:blank.
    To change a site security zone, open internet Options -> Security tab
    The zone for the current site is highlighted.
    Click sites and add sites as needed.
  2. Disable Protected Mode for all security zones or enable Protected Mode for all sucurity zones.
  3. Disable UAC on the machine. This will disable protected mode.
  4. Use BrowserFactory.Attach to get a new browser test object that works with the new tab process.