public class BrowserWindow extends BrowserObject
| Modifier | Constructor and Description |
|---|---|
protected |
BrowserWindow(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 BrowserWindow。
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptAlert()
按“确定”表示接受 JavaScript 警报。
|
void |
acceptAlert(String promptInput)
按“确定”表示接受 JavaScript 警报。
|
void |
back()
向后回顾历史记录。
|
void |
close()
关闭模式浏览器对话框、浏览器选项卡或浏览器本身(如果是最后一个选项卡或浏览器是 IE6)。
|
void |
dismissAlert()
解除 JavaScript 警报。
|
void |
executeJavaScript(String code)
Evaluates JavaScript code within the top-level document context.。
|
void |
forward()
向前回顾历史记录。
|
String |
getAlertText()
检索 JavaScript 警报的消息文本。
|
int |
getBrowserMajorVersion()
Returns the browser's major version number.。
|
Rect |
getHtmlRect()
以 HTML 像素检索 BrowserWindow 矩形。
|
String |
getUrl()
返回主要文档的 URL。
|
String |
getUserAgent()
返回浏览器的用户代理字符串。
|
boolean |
isAlertPresent()
如果打开了 JavaScript 警报则返回 true。
|
void |
navigate(String url)
导航主要文档至 URL。
|
void |
reload()
同浏览器中的重新加载按钮一样重新加载主要文档。
|
void |
reload(boolean bypassCache)
同浏览器中的重新加载按钮一样重新加载主要文档。
|
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, typePasswordKeyscaptureBitmap, 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, waitForPropertyequals, 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, toStringprotected BrowserWindow(JtfObjectHandle handle, Desktop desktop)
handle - 可确定 BrowserWindow 的句柄desktop - 此对象所在的桌面public void acceptAlert()
public void acceptAlert(String promptInput)
promptInput - 如果 JavaScript 警报是提示内容,则将该文本传递给警报public void back()
public void close()
public void dismissAlert()
public void executeJavaScript(String code)
code - 可评估的 JavaScript 代码public 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 - 可导航至的 URLpublic void reload()
public void reload(boolean bypassCache)
bypassCache - 设置为 true 以旁通缓存。这相当于在 Windows Internet Explorer 和 Mozilla Firefox 中按下 Ctrl+F5。当您使用 Google Chrome 时,设置此参数不会产生任何影响。Copyright 2009-2012 Micro Focus. All Rights Reserved.