I am new to RFT and currently evaluating for my company. I am trying to search a Html.BODY class object for a particular string, but I have not been able to accomplish it.
When I use the .toString method on the name that RFT gave the object, I get the following:
Here are the contents of the Rating Work Sheets: GuiTestObject(Name: html_worksheet, Map: worksheet)
How do I get the contents into a variable so that I can search that variable for a paricular value?
String AGR = html_worksheet().toString();
logInfo("Here are the contents of the Rating Work Sheets: " + AGR);
if (AGR.indexOf("<some search string>") < 0)
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
4 replies Latest Post - 2012-05-08T13:37:31Z by SystemAdmin
Pinned topic Search Html.BODY Class For Specific String.
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-05-08T13:37:31Z at 2012-05-08T13:37:31Z by SystemAdmin
Re: Search Html.BODY Class For Specific String.2012-05-08T07:11:10Z in response to SystemAdminthere is many ways to do that, here is the 2 ways I use to do:
return a list of TestObject...
A faster way with "atChild" method but you have to know the arborescence of the DOM :
TestObject browsers = find(atChild(".class","Html.BROWSER"));
TestObject documents = browsers.find(atChild(".class","Html.DOCUMENT"));
TestObject bodies = documents.find(atChild(".class","Html.BODY","property_to_find","property_value"));