IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.object.interfaces
Interface IBrowserObject

All Known Implementing Classes:
BrowserTestObject, EmbeddedBrowserTestObject

public interface IBrowserObject

Supported by objects that represent HTML browser objects.

Since:
RFT 6.1.1.1

Method Summary
 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.
 

Method Detail

back

boolean back()
Navigates the browser back to the previous page

Returns:
boolean - true when the navigation starts; false when there is no previous page.
Detail description:
This is the same as clicking the back in the browser window.
Example:

browser_htmlBrowser.back();
where browser_htmlBrowser is the BrowserTestObject
Since:
RFT 6.1.1.1

forward

boolean forward()
Navigates the browser forward to the next page

Returns:
boolean - true when the navigation starts; false when there is no forward page.
Detail description:
This is the same as clicking the forward button on browser Window.
Example:

browser_htmlBrowser.forward();
where browser_htmlBrowser is the BrowserTestObject
Since:
RFT 6.1.1.1

home

boolean home()
Navigates the browser to the default home page.

Returns:
boolean - true when the navigation starts; false when there is no home page defined for this browser.
Detail description:
This will take the browser to the home page. If there is any default home page defined for the browser ( Note that this depends on the configuration of the browser in use).
Example:

browser_htmlBrowser.home();
where browser_htmlBrowser is the BrowserTestObject
Since:
RFT 6.1.1.1

loadUrl

boolean loadUrl(java.lang.String url,                 java.lang.String target)
Loads the given URL into the browser.

Parameters:
url - string path of the page to load into browser
target - string name of the HTML frame where page is to be loaded
Returns:
boolean - true when the page load starts; false if the page does not load.
Detail description:
This will load the specified url path in to the specified frame of the browser.
Example:

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 RFT HTML logs.
Since:
RFT 6.1.1.1

loadUrl

boolean loadUrl(java.lang.String url)
Loads the given URL into the browser.

Parameters:
url - string path of the page to load into browser
Returns:
boolean - true when the page load starts; false if the page does not load.
Detail description:
This will load the specified url path in to the current browser
Example:

browser_htmlBrowser.loadUrl("http://www.ibm.com");
where browser_htmlBrowser is the BrowserTestObject
Since:
RFT 6.1.1.1

deleteCookies

void deleteCookies()
Deletes all of the browser's cookies.

Throws:
UnableToDeleteCookieException - if the cookie can not be deleted
Detail description:
This will delete all of the browser's cookies for the curretn profile user
Example:

browser_htmlBrowser.deleteCookies();
where browser_htmlBrowser is the BrowserTestObject
Since:
RFT 6.1.1.1

deleteCookies

void deleteCookies(java.lang.String cookie,                    boolean recursive)
Deletes browser cookies specified by the path in cookie

Throws:
CookieNotFoundException - when the specified cookie can not be found
UnableToDeleteCookieException - if the cookie can not be deleted
Parameters:
cookie - 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/.
Detail description:
This will delete all of the browser's cookies for the current profile user specified in the cookie path There is an option to perform a recursive delete.
Example:

browser_htmlBrowser.deleteCookies("CookieName",true);
where browser_htmlBrowser is the BrowserTestObject
Since:
RFT 6.1.1.1