public interface IBrowserObject
Modifier and Type | Method and Description |
---|---|
boolean |
back()
Navigates the browser back to the previous page
|
void |
deleteCookies()
Deletes all of the browser's cookies.
|
void |
deleteCookies(java.lang.String cookie,
boolean recursive)
Deletes browser cookies specified by the path in
cookie |
boolean |
forward()
Navigates the browser forward to the next page
|
boolean |
home()
Navigates the browser to the default home page.
|
boolean |
loadUrl(java.lang.String url)
Loads the given URL into the browser.
|
boolean |
loadUrl(java.lang.String url,
java.lang.String target)
Loads the given URL into the browser.
|
boolean back()
true
when the navigation starts;
false
when there is no previous page.browser_htmlBrowser.back();
where browser_htmlBrowser is the BrowserTestObjectboolean forward()
true
when the navigation starts;
false
when there is no forward page.browser_htmlBrowser.forward();
where browser_htmlBrowser is the BrowserTestObjectboolean home()
true
when the navigation starts;
false
when there is no home page defined for this browser. browser_htmlBrowser.home();
where browser_htmlBrowser is the BrowserTestObjectboolean loadUrl(java.lang.String url, java.lang.String target)
url
- string path of the page to load into browsertarget
- string name of the HTML frame where page is to be loadedtrue
when the page load starts;
false
if the page does not load.browser_htmlBrowser.loadUrl("http://www.ibm.com","logtitle");
where browser_htmlBrowser is the BrowserTestObject
In this example I am trying to load the http://www.ibm.com site in the topmost frame of the Functional Tester HTML logs.boolean loadUrl(java.lang.String url)
url
- string path of the page to load into browsertrue
when the page load starts;
false
if the page does not load.browser_htmlBrowser.loadUrl("http://www.ibm.com");
where browser_htmlBrowser is the BrowserTestObjectvoid deleteCookies()
UnableToDeleteCookieException
- if the cookie can not be deletedbrowser_htmlBrowser.deleteCookies();
where browser_htmlBrowser is the BrowserTestObjectvoid deleteCookies(java.lang.String cookie, boolean recursive)
cookie
CookieNotFoundException
- when the specified cookie can not be foundUnableToDeleteCookieException
- if the cookie can not be deletedcookie
- The full path of the cookie. This is usually the domain followed by the directory
path in which the intended document resides, for example, http://a.com.recursive
- If set, all cookies that are children of the path specified in cookie
are deleted, for example, a.com/b/.browser_htmlBrowser.deleteCookies("CookieName",true);
where browser_htmlBrowser is the BrowserTestObject