Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
regarding the DP
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi every one ,
In my Request type have one text box two combo boxes and 1 list box so i wanted to write Descriptive programming scrript and run through qtp so can u guys help me out
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Siri,

I cannot give you the detail script of each element you asked but just for some help, I can tell you about the dp of the text box.
First you have to record those text boxes otherwise they wont be matched from your object repository and then you can use DP to access them instead of direct using them.
Example-
Suppose you have orkut login page and you wanna write DP for the username and password text boxes.So you go as:

Code:
Set obj= Description.Create
obj("name").value="username"
obj("type").value = "text"

Browser("orkut - login").Page("orkut - login").WebEdit(obj).Set "deepak"
Browser("orkut - login").Page("orkut - login").WebEdit("password").SetSecure "47kcnzklfnsakfakl;fdmjahdgsadhgsahdgsadhg"
Browser("orkut - login").Page("orkut - login").WebButton("Login").Click

"obj" is the object you are creating for making a collection of properties of any class type i.e. WebEdit or WebButton etc.
In 2nd and 3rd line you assign values to particular identities of the object you chose like give some value to its name and give some value to its text.Now this value should be the same as mentioned in object repository,otherwise it will fail.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)