public class BrowserApplication extends Window
Note:
Modifier | Constructor and Description |
---|---|
protected |
BrowserApplication(JtfObjectHandle handle,
Desktop desktop)
Creates a new BrowserApplication with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the browser's cache.
|
void |
clearCache(int option)
Clears the browser's cache.
|
void |
closeOtherTabs()
Closes all tabs except the active one.
|
BrowserWindow |
closeTab()
Closes the specified tab.
|
BrowserWindow |
closeTab(int tabIndex)
Closes the specified tab.
|
BrowserWindow |
closeTab(ItemIdentifier tab)
Closes the specified tab.
|
BrowserWindow |
closeTab(String tabText)
Closes the specified tab.
|
boolean |
existsTab(int tabIndex)
Returns true if the tab exists and false otherwise.
|
boolean |
existsTab(ItemIdentifier tab)
Returns true if the tab exists and false otherwise.
|
boolean |
existsTab(String tabText)
Returns true if the tab exists and false otherwise.
|
BrowserWindow |
getActiveTab()
Deprecated.
In Silk Test 2011 or later use the
GetSelectedTab method instead. |
BrowserWindow |
getSelectedTab()
Returns the currently selected tab.
|
int |
getSelectedTabIndex()
Returns the index of the active tab.
|
String |
getSelectedTabName()
Returns the name of the active tab.
|
int |
getTabCount()
Returns the number of open tabs.
|
void |
navigate(String url)
Navigate to the specified URL in the currently active tab/window.
|
BrowserWindow |
openTab()
Opens a new tab and navigates to the given URL.
|
BrowserWindow |
openTab(String url)
Opens a new tab and navigates to the given URL.
|
BrowserWindow |
selectTab(int tabIndex)
Selects the specified tab.
|
BrowserWindow |
selectTab(ItemIdentifier tab)
Selects the specified tab.
|
BrowserWindow |
selectTab(String tabText)
Selects the specified tab.
|
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
- the handle that identifies the BrowserApplicationdesktop
- the desktop on which this object livespublic 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
- the tab to close. A tab name may contain the wildcards '*' and '?'.public BrowserWindow closeTab(String tabText)
tabText
- the tab to close. A tab name may contain the wildcards '*' and '?'.public BrowserWindow closeTab(int tabIndex)
tabIndex
- the tab to close. A tab name may contain the wildcards '*' and '?'.public boolean existsTab(ItemIdentifier tab)
tab
- the item identifier to locate the tabpublic boolean existsTab(String tabText)
tabText
- the item identifier to locate the tabpublic boolean existsTab(int tabIndex)
tabIndex
- the item identifier to locate the tabpublic BrowserWindow getActiveTab()
GetSelectedTab
method instead.public BrowserWindow getSelectedTab()
public int getSelectedTabIndex()
public String getSelectedTabName()
public int getTabCount()
public void navigate(String url)
url
- the URL to navigate topublic BrowserWindow openTab()
public BrowserWindow openTab(String url)
url
- the URL to navigate the new tab topublic BrowserWindow selectTab(ItemIdentifier tab)
tab
- the tab to select. A tab name may contain the wildcards '*' and '?'.public BrowserWindow selectTab(String tabText)
tabText
- the tab to select. A tab name may contain the wildcards '*' and '?'.public BrowserWindow selectTab(int tabIndex)
tabIndex
- the tab to select. A tab name may contain the wildcards '*' and '?'.Copyright 2009-2012 Micro Focus. All Rights Reserved.