|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<T> org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl<Browser> org.eclipse.swtbot.swt.finder.widgets.SWTBotBrowser
public class SWTBotBrowser
This represents a Browser
widget.
Field Summary |
---|
Fields inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot |
---|
description, display, log, widget |
Constructor Summary | |
---|---|
SWTBotBrowser(Browser browser)
Constructs an instance of this object with the given browser |
|
SWTBotBrowser(Browser browser,
SelfDescribing description)
Constructs an instance of this object with the given browser |
Method Summary | |
---|---|
void |
back()
Navigate to the previous session history item. |
void |
execute(String script)
Executes script in browser asynchronously |
void |
forward()
Navigate to the next session history item. |
Credentials |
getCredentials()
Gets credentials. |
String |
getText()
Gets the text of this object's widget. |
String |
getUrl()
|
boolean |
isBackEnabled()
|
boolean |
isForwardEnabled()
|
boolean |
isPageLoaded()
|
void |
refresh()
Refreshes browser |
void |
setCredentials(Credentials credentials)
Sets credentials, which will be used when page requires authentication, if both username and password set to null authentication (if requested) will be canceled |
void |
setCredentials(String username,
String password)
Sets credentials, which will be used when page requires authentication, if both username and password set to null authentication (if requested) will be canceled |
void |
setUrl(String url)
Loads given URI into browser, the page is loaded asynchronously (see isPageLoaded() ) |
void |
waitForPageLoaded()
Waits until browser loads page. |
Methods inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl |
---|
absoluteLocation, click, moveMouseToWidget, rightClick |
Methods inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot |
---|
assertEnabled, asyncExec, backgroundColor, click, click, clickXY, contextMenu, contextMenu, createEvent, createMouseEvent, createSelectionEvent, doubleClickXY, foregroundColor, getId, getToolTipText, hasStyle, isActive, isEnabled, isEnabledInternal, isVisible, keyboard, notify, notify, notify, pressShortcut, pressShortcut, pressShortcut, rightClick, rightClick, setFocus, sleep, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, toString, traverse, waitForEnabled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SWTBotBrowser(Browser browser)
browser
- the widget.
WidgetNotFoundException
- if the widget is null
or widget has been disposed.public SWTBotBrowser(Browser browser, SelfDescribing description)
browser
- the widget.description
- the description of the widget, this will be reported by AbstractSWTBot.toString()
WidgetNotFoundException
- if the widget is null
or widget has been disposed.Method Detail |
---|
public void setUrl(String url)
isPageLoaded()
)
url
- public String getUrl()
public String getText()
AbstractSWTBot
getText
in class AbstractSWTBot<Browser>
public void execute(String script)
script
- public boolean isBackEnabled()
public boolean isForwardEnabled()
public void back()
public void forward()
public void refresh()
public boolean isPageLoaded()
true
by default or when page was completely loaded by browser after asynchronous page load
invoked by #goURL(String)
was finished, this method returns false only during page loadingpublic void waitForPageLoaded()
TimeoutException
- if page is not loaded after default timeoutpublic void setCredentials(String username, String password)
Note: Credentials are shared by all SWTBotBrowser
instances.
username
- the usernamepassword
- the passwordpublic void setCredentials(Credentials credentials)
Note: Credentials are shared by all SWTBotBrowser
instances.
credentials
- the credentials with the username and passwordpublic Credentials getCredentials()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |