IBrowser Interface
A tab in an open Web browser.

C# Syntax

Remarks

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

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

.
Public Properties
 NameDescription
PropertyAbsoluteLocationThis 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)
PropertyDisplayNameThe object display name defined in the Application Model. (Inherited from HP.LFT.SDK.ITestObject)
PropertyLocationThis object's coordinates relative to the parent window in pixels. (Inherited from HP.LFT.SDK.ILocationInfoProvider)
PropertyNumberOfTabsThe number of currently open tabs in the browser.  
PropertyOpenTitleThe browser's initial title when first opened.  
PropertyOpenUrlThe URL from which the browser is opened.  
PropertyPageA test object representing the top-level document in the tab.  
PropertyParentThe 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)
PropertySizeThis object's size in pixels. (Inherited from HP.LFT.SDK.ILocationInfoProvider)
PropertyTitleThe browser title.  
PropertyURLThe browser URL.  
PropertyVersionData regarding the browser version and type.  
Top
Public Methods
 NameDescription
MethodBackNavigates to the previous page in the browser history list.  
MethodClearCacheClears the browser cache.  
MethodCloseCloses the browser window (or tab) that this test object represents.  
MethodCloseAllTabsCloses all tabs (if any) and closes the browser window.  
MethodDeleteCookiesOverloaded. Deletes all cookies from the browser.  
MethodDescribeOverloaded. Describes a child test object.  
MethodEmbedScriptRuns this JavaScript each time a page or frame loads or refreshes in the browser.  
MethodExistsChecks whether this object exists in the AUT before the default object synchronization timeout elapses. (Inherited from HP.LFT.SDK.ITestObject)
MethodFindChildren<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)
MethodForwardNavigates to the next page in the browser history list.  
MethodFullScreenOverloaded. Controls the browser's full screen mode.  
MethodGetDescriptionReturns 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)
MethodGetDialogTextReturns the text displayed in a browser message box, such as an alert, confirmation, or prompt.  
MethodGetSiblingTabsReturns a collection of tabs (Browser objects) that are siblings to the current tab (tabs located in the same window)  
MethodGetSnapshotCaptures a bitmap of this test object and returns a System.Drawing.Image of it. (Inherited from HP.LFT.SDK.ITestObject)
MethodGetTextLocationsReturns all rectangle areas containing the specified text within this object (Windows only). (Inherited from HP.LFT.SDK.ITestObject)
MethodGetVisibleTextReturns all visible text from this object. (Inherited from HP.LFT.SDK.ITestObject)
MethodHandleDialogOverloaded. Clicks a button on the alert, confirmation, or prompt message box.  
MethodHasDialogIndicates whether the browser message box is currently open.  
MethodHighlightHighlights this object in the AUT. (Inherited from HP.LFT.SDK.ITestObject)
MethodHighlightMatches<TChild>Highlights all children that match the specified test object type and description filter. (Inherited from HP.LFT.SDK.ITestObject)
MethodNavigateOpens the specified URL in the browser.  
MethodOpenNewTabOpens a new tab in the browser window.  
MethodRefreshRefreshes the current page.  
MethodResizeToOverloaded. Resizes the browser window to specific dimensions.  
MethodSetDescriptionReplaces this test object's description with the supplied description. (Inherited from HP.LFT.SDK.ITestObject)
MethodSyncWaits for the browser to complete the current navigation.  
MethodVerifyImageExistsChecks whether a snapshot of this object contains the supplied image. (Inherited from HP.LFT.SDK.ITestObject)
MethodVerifyImageMatchChecks 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