In Webtable first finding the Row count, Next Column count and getting the number of links / Webcheck boxes in a perticular cell based on the expected value matching with displayed value. Then performing the action on perticular Link with the index.
Code:-
Links
Dim objWebTable
Dim intRowCount , intRow, intColumnCount, intColumn, intLinksCount, intItemIndex, strLinkItem, blnExitFor
blnExitFor =False
Set objWebTable = Browser("Browser Name").Page("Page Name").WebTable("Web Table name")
intRowCount = objWebTable. RowCount
For intRow =1 to intRowCount
intColumnCount = objWebTable.ColumnCount(intRow)
For intColumn =1 to intColumnCount
strActualString = objWebTable.GetCellData(intRow, intColumn)
If UCase(Datatable.Value("expectedvalue","Global"))= UCase(strActualString) Then
Msgbox "strActualString - - "& strActualString
intLinksCount = objWebTable.ChildItemCount (intRow, intColumn, "Link")
For intItemIndex =0 to intLinksCount - 1
Set strLinkItem = objWebTable. ChildItem(intRow, intColumn, "Link" , intItemIndex)strLinkItem.Click ' Specify the required operations after clicking on linkNext
blnExitFor =True
Exit for
Next
End If
Next
If blnExitFor =True then
Reporter.Reporterevent Micdone,”Clicked on Link”, ”Clicked on link”
Exit For
End if
Next
WebCheckBoxes :-
In the below code covered for dynamic check boxes turn on functionality.
Scenario:- In Webtable check boxes are displaying Under one column (fixed) and number of check boxes are depended on number of rows.
Set objWebTable = Browser("Browser Name").Page("Page Name").WebTable("Web Table name")
intRowCount = objWebTable.RowCount ' objWebTable. RowReporter.ReportEvent micDone," Web table Row count"," No of Rows in the web table : - " & intRowCount
msgbox intRowCount
For intRow =2 to intRowCount
' msgbox intRow
Reporter.ReportEvent micDone," Web check box Row number ","Turned on Web Check Box , Row Number : - " & intRow
Set strLinkItem = objWebTable.ChildItem(intRow,0,"WebCheckBox",0)
strLinkItem.Set "ON"
Next
Tuesday, July 28, 2009
Friday, July 24, 2009
Settings for Flex Application Automation
Find the information for Install and Configure Flex Automated Testing in the below link.
http://www.adobe.com/support/documentation/en/flex/3/releasenotes_flex3_fb.html#install_automated_testing
For example find the application in the below link.
http://examples.adobe.com/flex2/inproduct/sdk/flexstore/flexstore.html
http://www.adobe.com/support/documentation/en/flex/3/releasenotes_flex3_fb.html#install_automated_testing
For example find the application in the below link.
http://examples.adobe.com/flex2/inproduct/sdk/flexstore/flexstore.html
Labels:
General
Subscribe to:
Posts (Atom)