Share this page

IBrowser Interface
A tab in an open Web browser.

C# Syntax

    public interface IBrowser : HP.LFT.SDK.ILocationInfoProvider, HP.LFT.SDK.ITestObject, HP.LFT.SDK.ITestObjectDescriber, IWebDescriber

Remarks

To open a new browser tab, use: BrowserFactory.Launch.

To access a browser that is already open, use: BrowserFactory.Attach

Public Properties

| Name | Description
--- | --- | ---
| AbsoluteLocation | This object's coordinates relative to the screen (in pixels). 0,0 is the top-left corner of the (primary) monitor. (Inherited from HP.LFT.SDK.ILocationInfoProvider)
| DisplayName | The object display name defined in the Application Model. (Inherited from HP.LFT.SDK.ITestObject)
| Location | This object's coordinates relative to the parent window in pixels. (Inherited from HP.LFT.SDK.ILocationInfoProvider)
| NumberOfTabs | The number of currently open tabs in the browser.
| OpenTitle | The browser's initial title when first opened.
| OpenUrl | The URL from which the browser is opened.
| Page | A test object representing the top-level document in the tab.
| Parent | The parent test object of this test object. The child object must be obtained using the Describe method, otherwise, it returns null. (Inherited from HP.LFT.SDK.ITestObject)
| Size | This object's size in pixels. (Inherited from HP.LFT.SDK.ILocationInfoProvider)
| Title | The browser title.
| URL | The browser URL.
| Version | Data regarding the browser version and type.

Top
Public Methods

| Name | Description
--- | --- | ---
| Activate | Activates the tab of the browser in the window group and if the setFocus parameter is true it clicks on it (Windows only). Syntax `void HP.LFT.SDK.Web.IBrowser.Activate (bool setFocus)` Parameters setFocus - Specifies whether to click the browser after it is activated. Default value: true If the setFocus parameter is set on an unsupported OS, an error of type unexpectedParameterException is returned.
| Back | Navigates to the previous page in the browser history list.
| ClearCache | Clears the browser cache.
| Close | Closes the browser window (or tab) that this test object represents.
| CloseAllTabs | Closes all tabs (if any) and closes the browser window.
| DeleteCookies | Overloaded. Deletes all cookies from the browser.
| Describe | Overloaded. Describes a child test object.
| EmbedScript | Runs this JavaScript each time a page or frame loads or refreshes in the browser.
| Exists | Checks whether this object exists in the AUT before the default object synchronization timeout elapses. (Inherited from HP.LFT.SDK.ITestObject)
| FindChildren<TChild> | Returns all the child test objects that match the specified test object type and description filter. For example, you can use this method to retrieve all Web buttons on a Page with type="submit". (Inherited from HP.LFT.SDK.ITestObject)
| Forward | Navigates to the next page in the browser history list.
| FullScreen | Overloaded. Controls the browser's full screen mode.
| GetDescription | Returns a clone of the description for this test object. The test object must be obtained using the Describe method, otherwise, this method returns null. (Inherited from HP.LFT.SDK.ITestObject)
| GetDialogText | Returns the text displayed in a browser message box, such as an alert, confirmation, or prompt.
| GetSiblingTabs | Returns a collection of tabs (Browser objects) that are siblings to the current tab (tabs located in the same window)
| GetSnapshot | Captures a bitmap of this test object and returns a System.Drawing.Image of it. (Inherited from HP.LFT.SDK.ITestObject)
| GetTextLocations | Returns all rectangle areas containing the specified text within this object (Windows only). (Inherited from HP.LFT.SDK.ITestObject)
| GetVisibleText | Returns all visible text from this object. (Inherited from HP.LFT.SDK.ITestObject)
| HandleDialog | Overloaded. Clicks a button on the alert, confirmation, or prompt message box.
| HasDialog | Indicates whether the browser message box is currently open.
| Highlight | Highlights this object in the AUT. (Inherited from HP.LFT.SDK.ITestObject)
| HighlightMatches<TChild> | Highlights all children that match the specified test object type and description filter. (Inherited from HP.LFT.SDK.ITestObject)
| Navigate | Opens the specified URL in the browser.
| OpenNewTab | Opens a new tab in the browser window.
| Refresh | Refreshes the current page.
| ResizeTo | Overloaded. Resizes the browser window to specific dimensions.
| SetDescription | Replaces this test object's description with the supplied description. (Inherited from HP.LFT.SDK.ITestObject)
| Sync | Waits for the browser to complete the current navigation.
| VerifyImageExists | Checks whether a snapshot of this object contains the supplied image. (Inherited from HP.LFT.SDK.ITestObject)
| VerifyImageMatch | Checks whether a snapshot of this object and the supplied image are a match, given the specified pixel and RGB tolerance values. (Inherited from HP.LFT.SDK.ITestObject)

Top

Tips to improve your search results... OpenText™ Functional Testing for Developers .NET SDK Version: 25.2 OpenText™ Functional Testing for Developers SDK 25.2 All View Local Help Center View Online Help Center Version: