Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to count the number of submenus of a drop down top menu on a website?
#3
Not Solved
Hi ,
Below is my script  and I want to get the all submenus names under top drop down menu on site http://divinevines.ca/. Please find the screenshot to understand the scenario.
Code:
Systemutil.CloseProcessByName "iexplore.exe"

Systemutil.Run "iexplore.exe","http://divinevines.ca/"

wait (3)
'a=Browser("Vancouver Flower Shop").Page("Vancouver Flower Shop").WebElement("fall flowers fresh arrangement").GetROProperty("
innertext")

Set omenu=Browser("Vancouver Flower Shop").Page("Vancouver Flower Shop").Object

Set m=omenu.getelementsbyclassname("down")

msgbox "Total top menus are  :"& m.length

' To count the submenus of 2nd menu as 1st has not submenus
For i=1 to m.length
   msgbox m(i).innertext
   zinnertext=m(i).innertext


Set desc=Description.Create
desc("micclass").value="Link"


   Browser("Vancouver Flower Shop").Page("Vancouver Flower Shop").WebElement("innertext:="&zinnertext,"html tag:=SPAN").FireEvent "onmouseover"
  set submenucount= Browser("Vancouver Flower Shop").Page("Vancouver Flower Shop").WebElement("innertext:="&zinnertext,"html tag:=UL").childobjects(desc)
  msgbox "submenu count is "& submenucount.count


Attached Files Image(s)
   
Reply


Messages In This Thread
RE: How to count the number of submenus of a drop down top menu on a website? - by pradeep singh - 09-20-2012, 11:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  VB Script to count number of links in a web page. Suma Parimal 4 25,281 07-01-2015, 12:59 PM
Last Post: govind
  Drag and drop issue excellentpawan123 0 2,746 01-13-2015, 05:04 PM
Last Post: excellentpawan123
  Drop down list class is a link thotamurali 2 4,195 08-22-2014, 05:48 PM
Last Post: thotamurali
  Selecting values from drop down using QTP. prempujaripati 2 46,767 06-26-2014, 06:06 PM
Last Post: rasmirani
  issue in drag and drop excellentpawan123 0 2,331 05-15-2014, 04:36 PM
Last Post: excellentpawan123

Forum Jump:


Users browsing this thread: 1 Guest(s)