Print Page | Close Window

Script to count no. of buttons in a webpage

Printed From: One Stop Testing
Category: Testing Tools @ OneStopTesting
Forum Name: QuickTest Pro @ OneStopTesting
Forum Discription: QuickTest Pro is a fresh approach to automated software and application testing that addresses testing needs of both business analysts and Quality Assurance professionals.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=7374
Printed Date: 26Dec2024 at 12:47am


Topic: Script to count no. of buttons in a webpage
Posted By: Mithi25
Subject: Script to count no. of buttons in a webpage
Date Posted: 25Nov2009 at 10:39pm
Ex 1:

SystemUtil.Run"www.google.com"
Set g=Browser("name:=Google").Page("title:=Google")
Set aa=description.Create
aa("html tag").value="INPUT"
aa("type").value="submit"
Set bb=g.childobjects(aa)
cc=bb.count
msgbox "number of buttons in a webpage=" & cc


Ex 2:

SystemUtil.Run"www.yahoomail.com"
Set g=Browser("name:=Yahoo! Mail: The best web-based email!").Page("title:=Yahoo! Mail: The best web-based email!")
Set aa=description.Create
aa("html tag").value="INPUT"
aa("type").value="submit"
Set bb=g.childobjects(aa)
msgbox "number of buttons in a webpage=" & bb.count


-------------
http://www.quick2sms.com - Send Unlimited FREE SMS to Any Mobile Anywhere in INDIA,
Click Here



Print Page | Close Window