Quantcast
Viewing all articles
Browse latest Browse all 14708

Re: Pop up calender's date selection scripting in QTP 9.2 [For web based application]

To select dynamic dates you have to use childitem method as follows :

        

      NoOfRows = Browser("").Window("Select Date -- Webpage").Page("Select Date").WebTable("").RowCount
 childcount=0
 For RowNo=1 to NoOfRows
  NoOfCols=Browser("Login").Window("Select Date -- Webpage").Page("Select Date").WebTable("").ColumnCount(RowNo)
  For ColNo=1 to NoOfCols
   p=Browser("Login").Window("Select Date -- Webpage").Page("Select Date").WebTable("").GetCellData(RowNo,ColNo)
   If Trim(p) = Trim(DayVar) Then
    Set obj=Browser("Login").Window("Select Date -- Webpage").Page("Select Date").WebTable("").ChildItem(RowNo,ColNo,"WebElement",0)
    obj.click
    Exit Function
   End If
  Next
 Next


Viewing all articles
Browse latest Browse all 14708

Trending Articles