QTP Script To Count no. of Checkboxes and to Check All Checkboxes in a Webpage
63QTP Script to count no. of checkboxes in a webpage
QTP Script to count no. of checkboxes in a webpage(pingomatic.com).
Set a=Description.Create
a("html tag").value="input"
a("type").value="checkbox"
Set b=Browser("name:=Ping-o-Matic!").Page("title:=Ping-o-Matic!").childobjects(a)
c=b.count
msgbox c
Check here for Data Driven Testing QTP
|
Software Testing (2nd Edition)
Price: $29.12
List Price: $49.99 |
|
Testing Computer Software, 2nd Edition
Price: $38.97
List Price: $70.00 |
|
Lessons Learned in Software Testing
Price: $21.00
List Price: $39.99 |
|
Agile Testing: A Practical Guide for Testers and Agile Teams
Price: $36.00
List Price: $49.99 |
|
Effective Software Testing: 50 Specific Ways to Improve Your Testing
Price: $29.86
List Price: $54.99 |
|
Pragmatic Software Testing: Becoming an Effective and Efficient Test Professional
Price: $28.98
List Price: $50.00 |
QTP Script to Check All Checkboxes in a Webpage
QTP Script to Check All Checkboxes in a Webpage.
Set a=Description.Create
a("html tag").value="input"
a("type").value="checkbox"
Set b=Browser("name:=").Page("title:=").childobjects(a)
c=b.count
msgbox c
For i=0 to c-1
b(i).set "on"
Next
QTP Scripts
Script for copying a file from One Folder to Another Folder in QTP?
Dim f
Set f = CreateObject("Scripting.FileSystemObject")
f.CopyFile "C:\lakshmi.txt", "D:\"
Msgbox "File Copied"
Above script is for copying a text file(lakshmi)from C drive to D drive.
The CopyFile method,performs the file copy operation.
The CopyFile method takes two parameters,the source file and the destination.
Script to Copy a folder from one drive to other in QTP.
Dim f
Set f = CreateObject("Scripting.FileSystemObject")
f.CopyFolder "D:\Test2", "C:\"
Msgbox "Folder Copied"
Above script is for copying a Folder(Test2)from D drive to C drive.
The CopyFolder method,performs the folder copy operation.
The CopyFolder method takes two parameters,the source folder and the destination
PrintShare it! — Rate it: up down flag this hub
Comments
Set ee=Description.Create
ee("html tag").value="input"
ee("type").value="Radio"
Set RadioButton_collection=Browser("name:=google.*").Page("title:=google.*").childobjects(ee)
print "Number of Radio Buttons:"&RadioButton_collection.count









syam says:
3 months ago
What is the script to count no of text boxes in web application(ex:userid, password)?