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?
#1
Not Solved
Hi to All,

Could anybody tell me how to count the sub menus of a drop down menu of a website?

For example:there is a top drop down menu name as Clothes
and its drop down submenus which comes on mouse over are Men wear,Ladies wear,children wear etc.
Reply
#2
Not Solved
Could you please post the snap shot of ur requirement. It would be helpful to understand what actually scenario is.

Regards,
Sankalp
Reply
#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
#4
Not Solved
Hi,

On my system I am not able to see the drop down list.

Refer to the attachment


Attached Files Image(s)
   
Reply
#5
Not Solved
Please open  this url in mozilla/chrome/IE 8 /other browsers http://divinevines.ca

See top menus on home page and mouse over on "fresh arrangements","summer flowers " etc.
Reply
#6
Not Solved
Won't be able to test on mozilla since don't have patch to support firefox.
I will try to check it on IE 8

Regards,
Sankalp
Reply


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)