public class BrowserApplication extends Window
注意:
Modifier | Constructor and Description |
---|---|
protected |
BrowserApplication(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 BrowserApplication。
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the browser's cache.。
|
void |
clearCache(int option)
Clears the browser's cache.。
|
void |
closeOtherTabs()
关闭除活动选项卡外的所有选项卡。
|
BrowserWindow |
closeTab()
关闭指定选项卡。
|
BrowserWindow |
closeTab(int tabIndex)
关闭指定选项卡。
|
BrowserWindow |
closeTab(ItemIdentifier tab)
关闭指定选项卡。
|
BrowserWindow |
closeTab(String tabText)
关闭指定选项卡。
|
boolean |
existsTab(int tabIndex)
如果存在选项卡,则返回 True,否则返回 False。
|
boolean |
existsTab(ItemIdentifier tab)
如果存在选项卡,则返回 True,否则返回 False。
|
boolean |
existsTab(String tabText)
如果存在选项卡,则返回 True,否则返回 False。
|
BrowserWindow |
getActiveTab()
Deprecated.
Silk Test 2011 或更高版本使用
GetSelectedTab 方法。 |
BrowserWindow |
getSelectedTab()
返回当前所选选项卡。
|
int |
getSelectedTabIndex()
返回活动选项卡的索引。
|
String |
getSelectedTabName()
返回活动选项卡的名称。
|
int |
getTabCount()
返回打开选项卡的数量。
|
void |
navigate(String url)
导航至当前活动选项卡/窗口中的指定 URL。
|
BrowserWindow |
openTab()
打开新选项卡并导航至指定的 URL。
|
BrowserWindow |
openTab(String url)
打开新选项卡并导航至指定的 URL。
|
BrowserWindow |
selectTab(int tabIndex)
选择指定选项卡。
|
BrowserWindow |
selectTab(ItemIdentifier tab)
选择指定选项卡。
|
BrowserWindow |
selectTab(String tabText)
选择指定选项卡。
|
close, closeSynchron, closeSynchron, getApplication, getCloseWindows, getFocus, getNextCloseWindow, getWindowState, isActive, maximize, minimize, move, restore, setActive, size
getHorizontalBar, getVerticalBar, openContextMenu, openContextMenu
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getBackground, getFont, getForeground, getNativeHandle, isEnabled, isFocused, isVisible, mouseMove, mouseMove, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, setBackground, setEnabled, setFocus, setFont, setForeground, setVisible, 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 BrowserApplication(JtfObjectHandle handle, Desktop desktop)
handle
- 可确定 BrowserApplication 的句柄desktop
- 此对象所在的桌面public void clearCache()
This method is only supported for Internet Explorer.
public void clearCache(int option)
This method is only supported for Internet Explorer.
option
- 0: Delete all. 1: Delete temporary internet files. 3: Delete cookiespublic void closeOtherTabs()
public BrowserWindow closeTab()
public BrowserWindow closeTab(ItemIdentifier tab)
tab
- 可关闭的选项卡。选项卡名称可包含通配符“*”和“?”。public BrowserWindow closeTab(String tabText)
tabText
- 可关闭的选项卡。选项卡名称可包含通配符“*”和“?”。public BrowserWindow closeTab(int tabIndex)
tabIndex
- 可关闭的选项卡。选项卡名称可包含通配符“*”和“?”。public boolean existsTab(ItemIdentifier tab)
tab
- 可定位选项卡的项目标识符public boolean existsTab(String tabText)
tabText
- 可定位选项卡的项目标识符public boolean existsTab(int tabIndex)
tabIndex
- 可定位选项卡的项目标识符public BrowserWindow getActiveTab()
GetSelectedTab
方法。public BrowserWindow getSelectedTab()
public int getSelectedTabIndex()
public String getSelectedTabName()
public int getTabCount()
public void navigate(String url)
url
- 可导航至的 URLpublic BrowserWindow openTab()
public BrowserWindow openTab(String url)
url
- 可导航至新选项卡的 URLpublic BrowserWindow selectTab(ItemIdentifier tab)
tab
- 可选择的选项卡。选项卡名称可包含通配符“*”和“?”。public BrowserWindow selectTab(String tabText)
tabText
- 可选择的选项卡。选项卡名称可包含通配符“*”和“?”。public BrowserWindow selectTab(int tabIndex)
tabIndex
- 可选择的选项卡。选项卡名称可包含通配符“*”和“?”。Copyright 2009-2012 Micro Focus. All Rights Reserved.