I am new to the board and new to Quick test. I am working with I.e. 8 and quick test 10. I am trying to right scripting to test a Java Based Web app. I have made progress but have become stuck . I am trying to make a web table object a variable in the global data sheet. Currently you search by an Id number . The results are loaded to a web table. To progress you need to click the hyperlinked name in the web Web element.
When I use the recorder it returns the web element as “James G” .
This is what I was trying to do !
Browser("UAT - WebPage").Page("UAT - WebPage_5").WebTable(DataTable("A", dtGlobalSheet)).GetCellData
Browser("UAT - WebPage").Page("UAT - WebPage_4").WebElement(DataTable("A", dtGlobalSheet)).Click
The Recorder Gives me.
Browser("UAT - WebPage").Page("UAT - WebPage_4").WebElement("James G").Click
Any Help would be appreciated since 80% of the site is coded like this for search.
You could try make the value Price a paramter from the data sheet, intead of putting price you would put somrthing like datatable.Value("Value","SheetName")
You would just have to add some logic so that after every search it would go to the next row in your excel sheet.
Look for GetRowCount, SetCurrentRow on the help file to get a little more info on that.
Spy on the webtable and check which property has the value "James G" , i guess it is "name" property.
modify your code as
msgbox browser("UAT - WebPage").Page("UAT - WebPage_5").WebTable("name:="&DataTable("A", dtGlobalSheet)).GetCellData(row_number,column_numb er)
After using the spy the WebElement does not have a name property. But James G show in Innerhtml,InnerText, and outertext
Rajpes I try your suggestion and it Errors out due to it no being unique enough to completely id the object