public class BrowserWindow extends BrowserObject
Modifier | Constructor and Description |
---|---|
protected |
BrowserWindow(JtfObjectHandle handle,
Desktop desktop)
Creates a new BrowserWindow with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptAlert()
Accepts a JavaScript alert by pressing OK.
|
void |
acceptAlert(String promptInput)
Accepts a JavaScript alert by pressing OK.
|
void |
back()
Goes back in the history.
|
void |
close()
Close a modal browser dialog, a tab of the browser, or the browser itself if it is the last tab (or IE6).
|
void |
dismissAlert()
Dismisses a JavaScript alert.
|
void |
executeJavaScript(String code)
Evaluates JavaScript code within the top-level document context.
|
void |
forward()
Goes forward in the history.
|
String |
getAlertText()
Retrieves the message text of a JavaScript alert.
|
int |
getBrowserMajorVersion()
Returns the browser's major version number.
|
Rect |
getHtmlRect()
Retrieves the rectangle of the BrowserWindow in HTML pixels.
|
String |
getUrl()
Returns the URL for the main document.
|
String |
getUserAgent()
Returns the browser's user agent string.
|
boolean |
isAlertPresent()
Returns true if a JavaScript alert is open.
|
void |
navigate(String url)
Navigates the main document to an URL.
|
void |
reload()
Reloads the main document as the reload button in the browser does.
|
void |
reload(boolean bypassCache)
Reloads the main document as the reload button in the browser does.
|
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, isVisible, mouseMove, mouseMove, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, setFocus, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getText, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected BrowserWindow(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the BrowserWindowdesktop
- the desktop on which this object livespublic void acceptAlert()
public void acceptAlert(String promptInput)
promptInput
- if the JavaScript alert is a prompt, this text is passed to the alertpublic void back()
public void close()
public void dismissAlert()
public void executeJavaScript(String code)
code
- the JavaScript code to evaluatepublic void forward()
public String getAlertText()
public int getBrowserMajorVersion()
public Rect getHtmlRect()
public String getUrl()
public String getUserAgent()
public boolean isAlertPresent()
public void navigate(String url)
url
- the URL to navigate topublic void reload()
public void reload(boolean bypassCache)
bypassCache
- set to true to by-pass the cache. This is equivalent to pressing Ctrl+F5 in Windows Internet Explorer and Mozilla Firefox. When you are using Google Chrome, setting this parameter has no effect.Copyright 2009-2012 Micro Focus. All Rights Reserved.