Browser Class

Progress Software Corporation - Testing Framework 2018.1 Automation Infrastructure
Class represents a browser instance managed by the Manager. This object exposes all the browser specific information and methods to automate the underlying browser that this instance represents.
Inheritance Hierarchy


Namespace:  ArtOfTest.WebAii.Core
Assembly:  ArtOfTest.WebAii (in ArtOfTest.WebAii.dll) Version: 2018.1.116.0 (2018.1.116.0)

public class Browser : IAutomationHost, ISupportSearchHost

The Browser type exposes the following members.


Public propertyActions
Gets the Actions object that can be used to perform different actions against the loaded document in the browser.
Public propertyAnnotator
Gets the Annotator object associated with this browser.
Public propertyAutoDomRefresh
Gets/Sets whether to automatically refresh the DOM tree after each browser command.
Public propertyAutoWaitUntilReady
Gets/Sets whether to automatically wait until browser is ready after each browser command.
Public propertyBrowserType
Gets the browser type (i.e. IE/FireFox ...etc)
Public propertyClientId
The unique ID for this browser that the manager identifies it with.
Public propertyCommandTimeOut
Gets/Sets the max wait time in milliseconds that the browser will wait for a command to process before it times out.
Public propertyContentRectangle
Gets the rectangle of the content window or element
Public propertyContentWindow
Gets the container window of the browser that contains the actual content of the page. (Excludes the browser toolbars, buttons ...etc.)
Public propertyCookies
Gets the cookies manager associated with this browser that allows you to retrieve, delete and add cookies.
Public propertyCreationTime
The UTC time this instance was instantiated.
Public propertyDesktop
Desktop object that draws its annotations in this browser
Public propertyDomTree
Gets the DOM Tree representation of the currently loaded document.
Public propertyFind
Gets the Find objects used to provide a rich set of methods to help identify elements in the Dom tree associated with this browser object.
Public propertyFrameElement
Gets the Element object for the frame element represented by this Browser object, if this Browser represents a frame. If this Browser does not represent a frame, FrameElement is null.
Public propertyFrameInfo
Gets the frame information if IsFrame = true else will return null. FrameInfo contains frame index and frame name.
Public propertyFrames
List of child frames contained in this instance
Public propertyFriendlyName
Get a friendly name for this browser instance.
Public propertyIsConnected
Gets whether the browser is connected to manager of not.
Public propertyIsFrame
Gets whether this instance represents a frame or not.
Public propertyIsIEDialog
Gets whether this instance is an IE dialog (Modal/Modeless)
Public propertyIsUILess
Whether this browser is UI less browser. (i.e. a raw http request/response browser)
Public propertyManager
The manager of this browser object.
Public propertyNativeInstance
The native instance of this browser object (if available), otherwise null
Public propertyPageTitle
Gets the page title if one exists. (text content of the 'title' tags)
Public propertyQueryString
Gets a parsed name/value collection of the query string.
Public propertyRegions
Gets a dictionary of all identified test regions in the currently loaded document.
Public propertyStateHashCode
Get the state hash code.
Public propertyTechnologyType
Get the technology type
Public propertyUniqueId
Gets a unique id that identifies this browser instance.
Public propertyUrl
Gets the current page URL. This property is refreshed when calling RefreshDOMTree().
Public propertyVersion
The browser version for this browser type.
Public propertyViewSourceString
Gets the source of the page currently loaded in the browser. This is the string that the framework used to build the DOM.
Public propertyWindow
Gets the Win32 window object representing the actual browser window.

Public methodCapture
Capture the image of this browser
Public methodClearCache
Clear the cache of a certain category.
Public methodClose
Closes a browser window.
Public methodClose(Int32)
Closes a browser window with a custom wait to close timeout.
Public methodContainsPoint
True/False whether a specific point falls within this browser/frame rendering region
Public methodContainsRectangle
True/False whether a specific rectangle falls within this browser/frame rendering region
Public methodContainsText
True/False whether the 'text' is contained within the page currently loaded. Not case sensitive.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExecuteCommand(BrowserCommand)
Executes a command against this browser instance.
Public methodExecuteCommand(BrowserCommand, Boolean, Boolean)
Executes a command against this browser instance.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetChildHosts
Get all containing child hosts. For Browser, this will return a list of all Frames (if any) + any SilverlightApp instances
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetHostRoot
Get the root element of the DomTree
Public methodGetSelectedText
Gets the text currently selected by the user in the browser window
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGoBack
Simulates a go back browser action.
Public methodGoForward
Simulates a go forward browser action.
Public methodIsReady
Gets whether the browser is ready or not.
Public methodLocateAllInHost
Locates all elements contained in the browser's DOM matching the specified find expression.
Public methodLocateInHost
Locate an element in the host using an expression.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNavigateTo(String, Boolean)
Navigate the browser to a specific url and then enable the script logging.
Public methodNavigateTo(Uri, Boolean)
Navigate the browser to a specific url.
Public methodPrepareFrameForClosing
Used to disable the AutoRefreshDom and WaitUntilReady of a frame preparing it to be closed on next action and no longer pulled by the framework.
Public methodRefresh
Simulates a browser Refresh.
Public methodRefreshDomTree
Force a referesh of the DOM tree from the current document.
Public methodResizeContent(Rectangle)
Resize the browser window content to the specified window rectangle. This function will handle the padding between the outer browser window and the content window. If the new rectangle will not fit within the bounds of the screen, this method will try to approximate the requested size within the bounds of the screen.
Public methodResizeContent(Int32, Int32, Int32, Int32)
Resize the browser window content to the specified window rectangle. This function will handle the padding between the outer browser window and the content window.
Public methodScrollBy
Scroll this window by offset x horizontally and y vertically.
Public methodStop
Simulate a stop navigation browser action.
Public methodToggleFullScreen
Toggle the browser in and out of Full Screen (F11)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberTranslateBrowserOffset
Translates an offset from one browser to another. Useful because offset values recorded in Internet Explorer are typically two pixels different from offset values for the same relative point in other browsers.
Protected methodUpdateDomTree
Parse and update the DomTree
Public methodUpdateInterHostLinks
Ensures that any links between hosts are up-to-date (Infrastructure use only)
Public methodWaitForAjax
Wait for any active AJAX requests to complete.
Public methodWaitForElement(Int32, String)
Wait for an element to exist. If it exists, return the Element object, else will throw a Timeout Exception.
Public methodWaitForElement(HtmlFindExpression, Int32, Boolean)
Wait for an element to exist. If it exists, return the Element object, else will throw a Timeout Exception.
Public methodWaitForFrame(FrameInfo)
Wait for a frame to exist. Uses the Settings.ClientReadyTimeout as the timeout
Public methodWaitForFrame(FrameInfo, Int32)
Wait for a frame to exist.
Public methodWaitForUrl
Wait for a specific url to be set. This can be used to wait for browser redirects on certain sites.
Public methodWaitUntilReady
Waits for the browser until its ready

Public eventAfterCommandExecuted
Event occurs after the command is executed and the response is available.
Public eventBeforeCommandExecuted
Event occurs before a command is pushed to the browser.
Public eventClosing
Event occurs when the browser is about to close. [Browser.Close()] is called.
Public eventDomRefreshed
Event occurs after the DomTree is rebuilt (either after a command is executed or when RefreshDom is called)
Extension Methods

Public Extension MethodGetSilverlightAppIndex
Finds the index into the SilverlightApp array of the specified plugin
(Defined by SilverlightAppFinder.)
Public Extension MethodSilverlightApps
Returns an array of all Silverlight Applications on this page.
(Defined by SilverlightAppFinder.)
Public Extension MethodTagFrame (Defined by BrowserExtensions.)
See Also