Question:
Suppose I want to do DP for licindia.com where I need to click on the login button. Here the hierarchy captured through Object spy shows as
Browser->frame->webTable->webTable->webTable->webTable->Button
In this case how should be the DP for clicking on the button?
Ans:
Beginners will feel difficult when writing descriptive programming.
Here is an example how to write descriptive programming when there are many objects in an object hierarchy.
The basic hierarchy of an object is Browser--> Page --> Object
Suppose I want to do DP for licindia.com where I need to click on the login button. Here the hierarchy captured through Object spy shows as
Browser->frame->webTable->webTable->webTable->webTable->Button
In this case how should be the DP for clicking on the button?
Ans:
Beginners will feel difficult when writing descriptive programming.
Here is an example how to write descriptive programming when there are many objects in an object hierarchy.
The basic hierarchy of an object is Browser--> Page --> Object
Some times when you spy on object
it shows Browser--> Page -->WebTable--> WebTable-->WebTable-->Object
But in DP you can ignore webtables
in the hierarchy and consider Browser--> Page --> Object.
When the hierarchy is like Browser-->
Page -->Frame-->WebTable--> WebTable-->WebTable-->Object
Then consider Browser--> Page -->Frame-->Object
Then consider Browser--> Page -->Frame-->Object
A Simple Technique to identify how to write DP when you have confusion in hierarchy level
1. Add that object to Object
Repository
2. Identify the hierarchy in
OR
3. Follow the same hierarchy for
writing DP
If you're working in the Web Environment, you can totally skip all intermediate objects and only consider the top-most and the bottom-most object and still retrieve the exact same result as you would otherwise. Therefore, saying that:When the hierarchy is like Browser--> Page -->Frame-->WebTable--> WebTable-->WebTable-->ObjectThen consider Browser--> Page -->Frame-->Objectis also equivalent to:Browser--> Page -->Frame-->ObjectBrowser--> Page -->ObjectBrowser--> ObjectHowever, the statement about skipping intermediate objects does not apply to all technologies.
ReplyDeleteYes Anshoo. We can do that.I have given a standard technique to write.
ReplyDelete