IBrowser Interface
A tab in an open Web browser.

C# Syntax


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

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

Public Properties
  Name Description
Property 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)
Property DisplayName The object display name defined in the Application Model. (Inherited from HP.LFT.SDK.ITestObject)
Property Location This object's coordinates relative to the parent window in pixels. (Inherited from HP.LFT.SDK.ILocationInfoProvider)
Property NumberOfTabs The number of currently open tabs in the browser.  
Property OpenTitle The browser's initial title when first opened.  
Property OpenUrl The URL from which the browser is opened.  
Property Page A test object representing the top-level document in the tab.  
Property 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)
Property Size This object's size in pixels. (Inherited from HP.LFT.SDK.ILocationInfoProvider)
Property Title The browser title.  
Property URL The browser URL.  
Property Version Data regarding the browser version and type.  
Public Methods
  Name Description
Method Back Navigates to the previous page in the browser history list.  
Method ClearCache Clears the browser cache.  
Method Close Closes the browser window (or tab) that this test object represents.  
Method CloseAllTabs Closes all tabs (if any) and closes the browser window.  
Method DeleteCookies Overloaded. Deletes all cookies from the browser.  
Method Describe Overloaded. Describes a child test object.  
Method EmbedScript Runs this JavaScript each time a page or frame loads or refreshes in the browser.  
Method Exists Checks whether this object exists in the AUT before the default object synchronization timeout elapses. (Inherited from HP.LFT.SDK.ITestObject)
Method 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)
Method Forward Navigates to the next page in the browser history list.  
Method FullScreen Overloaded. Controls the browser's full screen mode.  
Method 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)
Method GetDialogText Returns the text displayed in a browser message box, such as an alert, confirmation, or prompt.  
Method GetSiblingTabs Returns a collection of tabs (Browser objects) that are siblings to the current tab (tabs located in the same window)  
Method GetSnapshot Captures a bitmap of this test object and returns a System.Drawing.Image of it. (Inherited from HP.LFT.SDK.ITestObject)
Method GetTextLocations Returns all rectangle areas containing the specified text within this object (Windows only). (Inherited from HP.LFT.SDK.ITestObject)
Method GetVisibleText Returns all visible text from this object. (Inherited from HP.LFT.SDK.ITestObject)
Method HandleDialog Overloaded. Clicks a button on the alert, confirmation, or prompt message box.  
Method HasDialog Indicates whether the browser message box is currently open.  
Method Highlight Highlights this object in the AUT. (Inherited from HP.LFT.SDK.ITestObject)
Method HighlightMatches<TChild> Highlights all children that match the specified test object type and description filter. (Inherited from HP.LFT.SDK.ITestObject)
Method Navigate Opens the specified URL in the browser.  
Method OpenNewTab Opens a new tab in the browser window.  
Method Refresh Refreshes the current page.  
Method ResizeTo Overloaded. Resizes the browser window to specific dimensions.  
Method SetDescription Replaces this test object's description with the supplied description. (Inherited from HP.LFT.SDK.ITestObject)
Method Sync Waits for the browser to complete the current navigation.  
Method VerifyImageExists Checks whether a snapshot of this object contains the supplied image. (Inherited from HP.LFT.SDK.ITestObject)
Method 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)