Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to select item within WebMenu
#1
Not Solved
hi,

I need help. I had figured out a way to select links using descriptive programming and am now not able to select an item within a WebMenu.
I cannot loop through theitems within that WebMenu .
Properties of the WEbMenu include:

top level items: Email;SMS;Telephone (Land Line);Postal;Cell Phone
outetext: EmailSMSTelephone (Land Line)PostalCell Phone

How can I loop through and select oneof these options?
Reply
#2
Not Solved
Can you please share the screenshot of the SPY and it would be great if you can share the page link (provided it a generic website but not the client website page).
Thanks,
SUpputuri
Reply
#3
Not Solved
Hi,

If you spy on the webmenu u will get all items options so use below syntax.

starValues = B().Pg().webmenu().getropropert("all items")

''Webmenu items will be segregated by space or semi coloumn mostly. In that case split the according to delimeter shown in object spy

strValArray = Split(starValues ,; )
Msgbox Ubound(strValArray)

''Use for loop to get values and add conditional stmt to select values

For i= 0 to ubound(strValArray )

Print Trim(strValArray (i))

Next

'''Please tell me if i answered ur question
Reply
#4
Not Solved
This is what my code looks like:
 Elements =  Browser().Page().WebElement().GetROProperty("all items")
 iTemCount =  Elements.Count

        For intCounter = 0 to iTemCount - 1
            WebValue = Elements(intCounter).GetROProperty("innertext")
            If Instr (1LCase(WebValue)LCase(CrReg)) Then
            MsgBox CrReg
                Setting.WebPackage("ReplayType") = 2
                Elements(intCounter).Click  --------------This is where my code fails. i.e I cannot click on the desired value
                Setting.WebPackage("ReplayType") = 1
                Exit For
            End If
        Next
Reply
#5
Not Solved
(10-04-2016, 09:21 PM)Hi,This is what my code looks like: Wrote:  Elements =  Browser().Page().WebElement().GetROProperty("all items")
 iTemCount =  Elements.Count

        For intCounter = 0 to iTemCount - 1
            WebValue = Elements(intCounter).GetROProperty("innertext")
            If Instr (1LCase(WebValue)LCase(CrReg)) Then
            MsgBox CrReg
                Setting.WebPackage("ReplayType") = 2
                Elements(intCounter).Click  --------------This is where my code fails. i.e I cannot click on the desired value
                Setting.WebPackage("ReplayType") = 1
                Exit For
            End If
        Next
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ContextMenu item disabled Powerbuilder Phread 1 4,162 05-24-2012, 10:15 AM
Last Post: Shridevi.Salagare
  Unable to select an item from weblist and unable to enter text in edit box estherindu 5 9,561 05-15-2012, 12:07 AM
Last Post: viswa
Rolleyes How to select multiple choices from Multi-Select weblist blavanya 3 9,832 01-03-2012, 05:55 PM
Last Post: shivu.hanu
  to check if an item in the list is disabled or not sujaravi123 6 15,704 12-13-2011, 08:15 PM
Last Post: PrabhatN
Question How to access Menu item using DP Charanpreet 0 3,104 04-19-2011, 07:34 PM
Last Post: Charanpreet

Forum Jump:


Users browsing this thread: 3 Guest(s)