I am new to RFT and I am in the process of trying to use DOM with RFT.

Here's the scenario. I am just trying the basic things here. I want make sure only one browser is open and that I want 2 tabs with the same page. I am just basically try to see if I can navigate 2 tabs but I am just having a tough time trying to get the second tab load to the right page. Any help on this is much appreciated.

<font class="small">Code:</font><hr /><pre>
import resources.RFT_DOM_ExerciseHelper;
import com.rational.test.ft.*;
import com.rational.test.ft.object.interfaces.*;
import com.rational.test.ft.object.interfaces.SAP.*;
import com.rational.test.ft.object.interfaces.WPF.*;
import com.rational.test.ft.object.interfaces.dojo.*;
import com.rational.test.ft.object.interfaces.siebel.*;
import com.rational.test.ft.object.interfaces.flex.*;
import com.rational.test.ft.object.interfaces.generichtml subdomain.*;
import com.rational.test.ft.script.*;
import com.rational.test.ft.value.*;
import com.rational.test.ft.vp.*;
import com.ibm.rational.test.ft.object.interfaces.sapwebp ortal.*;

public class RFT_DOM_Exercise extends RFT_DOM_ExerciseHelper

public void testMain(Object[] args)

RootTestObject rtoRoot = getRootTestObject();
TestObject[] toTestObj;
BrowserTestObject btoBrowser;
TestObject[] toTabs;
int iTemp;

// Try to see if there are any browsers open
toTestObj = rtoRoot.find(atDescendant(".class", "Html.HtmlBrowser"));
System.out.println("Browsers currently open: " + toTestObj.length);

// Close all the browsers
iTemp = toTestObj.length;
while (iTemp &gt; 0){
btoBrowser = new BrowserTestObject(toTestObj[iTemp-1]);


// wait till the browser is up and running
toTestObj = rtoRoot.find(atDescendant(".class", "Html.HtmlBrowser"));
} while (toTestObj.length &lt; 1);

System.out.println("Browsers currently open: " + toTestObj.length);
// There should only be one browser since we closed all of them earlier

btoBrowser = new BrowserTestObject(toTestObj[0]);

// Check the readystate
while (Integer.parseInt(btoBrowser.getProperty(".readySt ate").toString()) &lt; 4)
System.out.println("Loading in Progress");
System.out.println("Page is Loaded");

// Keep in Mind that with IE7 and later, there is tab.
// Now we going to see how many tabs are open

toTabs = btoBrowser.find(atDescendant(".class", "Html.HtmlBrowser.Tab"));
System.out.println("Number of tabs: " + toTabs.length);

GuiTestObject gtoTab;

for (int iCount=0; iCount&lt;toTabs.length; iCount++)
System.out.println("Tab title is: " + toTabs[iCount].getProperty(".title").toString());

// I want a new tab
gtoTab = (GuiTestObject)toTabs[toTabs.length-1];

// Codes below is an attempt to load a new page in the second tab.
TestObject [] toNew;

toNew = rtoRoot.find(atDescendant(".class", "Html.HtmlBrowser"));
} while (toNew.length &lt; 1);

System.out.println("Number of New Browser: " + toNew.length);

BrowserTestObject btoRefBrowser = new BrowserTestObject(toNew[0]);

// Load the SITS website in the second tab
// Check the readystate
while (Integer.parseInt(btoRefBrowser.getProperty(".read yState").toString()) &lt; 4)
System.out.println("Loading in Progress");
System.out.println("Page is Loaded");

// printAllProperties(toTabs[0]);

// doesn't work. .url is read only and can not be set
TestObject[] to = btoBrowser.find(atDescendant(".class", "Html.HtmlDocument"));
System.out.println("Number of HTMLDoc: " + to.length);
GuiTestObject gtoHTMLDoc=(GuiTestObject) to[1];
gtoHTMLDoc.setProperty(".url", "www.google.com");


</pre><hr />