|
Desptive Programming for YahooMail
|
|
04-15-2008, 11:32 AM
you have to specify the property name and its value. (You can use Object Spy to determine the properties and their values)
Example: Code: Browser("name:=google").Page("title:=google").webedit("html Tag:=Input","name:=q").Set "test"
04-16-2008, 12:57 PM
Hi,
Can you explain me why we write 'name' and 'title' in DP.title.The script Browser("google").Page("google").webedit("q").Set "test" will work fine if we add all the items in OR .Please correct me if i am wrong. Regards. Sherin
04-16-2008, 03:02 PM
@sherinvg: what Niranjan told is descriptive programming and what you are doing is normal recording using object repository. These are two different approaches ( though it is always possible to mix them)
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
04-17-2008, 11:18 AM
hi,
why i asked this question is i tried both the ways , First i wrote the script Code: 'Browser("google").Page("google").webedit("q").Set "test" 'Later i wrote the code Code: 'Browser("name:=google").Page("title:=google").webedit("html Tag:=Input","name:=q").Set "test" 'Both the ways i could execute the code that too without doing normal recording.My doubt is can i say the first script which i wrote here is descriptive programming. Thanks/Regards Sherin
04-17-2008, 08:09 PM
No. The first script does not come under descriptive programming.
For DP: you manually supply Object properties and its values. In the second script, it will work even if you dont add objects to OR. (Bcoz we are supplying all the properties and values for all the objects in the heirarchy). You can make use of OR in the following case, Code: Browser("google").Page("google").webedit("html Tag:=Input","name:=q").Set "test"
04-19-2008, 08:24 PM
hi,
thanks for your reply.it was very useful for me,thanks a lot one more doubt.when we use DP what all properties we need to include ,for example html Tag,name,title...please help Thanks and regards Sherin
04-20-2008, 04:23 AM
As far as I know, you can use any property(and its value) that is available when you spy over the object (using object spy).
One thing to note is avoid using the properties which have numerical values... example: height, width, abs_y, etc
04-20-2008, 01:25 PM
Hi,
Is that a mandatory that ,we need to include those properties in DP which we have added as mandatory and assitive properties in object identification window or else the reverse ? Thanks and Regards Sherin
04-20-2008, 06:33 PM
Its not mandatory that you have to only include those.
You can include any properties you want. |
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| inbox link in yahoomail site | mansalata | 2 | 3,370 |
05-02-2012, 12:51 PM Last Post: sshukla12 |
|
Users browsing this thread: 1 Guest(s)

