Hi All,
I got solution for menu sub menu selection,
i share my coding.
Set oFirstLevel=Browser("FirstLevel").Page("FirstLevel")
MenuSelect "Main
Menu",oFirstLevel.Frame("title:=ScFlex.*"),
20,"File>Masters>Settings>Logon>Applications>Telenet"
Function MenuSelect(ByVal strLogicalName,ByVal oPage,ByVal
inWait,ByVal strMenuPath)
Dim oDict:Set oDict=CreateObject("Scripting.Dictionary")
Dim oRuntimeTable
Dim blFlag:blFlag=False
Dim oTable:Set oTable=Description.Create()
oTable("micclass").Value="WebTable"
oTable("class").Value="clsChildDiv"
oTable("visible").Value=True
Dim arrPath
arrPath=Split(strMenuPath,">")
For i=0 to Ubound(arrPath)
oDict.Add i,arrPath(i)
Next
If oPage.Link("name:="& oDict.Item(0)).Exist(inWait) Then
oPage.Link("name:="& oDict.Item(0)).FireEvent "onmouseover"
wait(2)
For j=1 to oDict.Count-1
Set oRuntimeTable=oPage.ChildObjects(oTable)
wait(1)
oCount=oRuntimeTable.Count-1
If oRuntimeTable(oCount).Object.Style.visibility="visible" Then
rowno=Cint(oRuntimeTable(oCount).GetRowWithCellText(" "&
oDict.Item(j)&" ",1,1))
If rowno>0 Then
oRuntimeTable(oCount).Childitem(rowno,1,"WebElement",0).FireEvent
"onmouseover"
oRuntimeTable(oCount).Childitem(rowno,1,"WebElement",0).Click
wait(1)
End If
Next
Report.WriteReport Util.Counter,"Selected the "&strMenuPath&" path",0
Else
Report.WriteReport Util.Counter,"Unable to select the "&strMenuPath&"
path"&";"&oDict.Item(o)&" menu is not available",1
End If
Set oDict=Nothing
Set oTable=Nothing
Set oRuntimeTable=Nothing
End Function
On Feb 24, 12:18 pm, "K.Byzoor Rahuman., I.A.S" <[email protected]>
wrote:
> Hi All,
>
> I need script for select the item from the Menu--> Sub Menu --> Sub Sub Menu
> --> Sub Sub Sub Menu
>
> Menu --> Sub Menu -->Sub Menu -->Sub Menu
>
> Ex: I want to selct Shared in sub menu
>
> Automation Tool-->QTP-->*OR-->**Shared*
> *
> *
> *Main Manu item *: Automation Tool, Development Tool
> *Sub Menu for Automation Tool :* QTP, WR, Sellinum, RFT
> *Sub Menu for QTP : OR, FN Lib,Action*
> *Sub Menu for for OR: Shared. Per Action*
> *
> *
> *
> *
> *All menu are QTP identfy Webtable and WebElement.*
> *
> *
> *
> *
> *Please Provide solution.*
> *
> *
> *Thanks in advance.*
> *
> *
> *Regards,*
> *Byzoor,*
> *
> *
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en