Descriptive Programming for Flight Application Script, When
to use and Learn Descriptive Programming Practical Applications in QTP
Here in this part of tutorials of QTP descriptive
Programming we will learn and explain the practical application for descriptive
programming. Use of ChildObjects() a
method can be used to find all type
of child objects for any parent object.
- A very precious question is that if QTP can handle the Object Identification process then why uses DP.
- Assume that you are providing the test for a Flight portal, here you need to test search function or query available in portal and your test scenario is required to include all the vacant seat available at once, Select all and then click on Ok or apply Vacant Seat.
- But as you know that nos of jobs visibility are depends on the search query and jobs available at the time of execution of the script but there is to any way to forecast in advance the no of jobs that should be visible.
- So in this case, you should use the descriptive programming. Even though you don’t know the number or the names of the desire checkbox and you also don’t know the class for the object as “WebCheckBox”.
- Now you may use the ChildObject method to return objects relating to a individual parent.
- Line of code will be like this – Set allObjects = Browser(“AvailableSeat”).Page(“QTP”).ChildObject()
- All Childs objects will be return on this page.
- Here we like only WebCheckBox objects. So for this we can generate a filter generation object and then set its properties as WebCheckBox and Pass this filter as a variable for this ChildObjects function.
- Only check boxes will return in such case.
- For Further step, you can develop a code such like the all collection of checkboxes starting from 0 & ON all the check boxes.
- Now you just need to click on apply button to execute your test.
- Descriptive programming can also be used to run the objects which will be comparatively difficult to record like Auto – Hide panls, Nested inner objects, Objects with changing hierarchies, Sub menus.
- Advanced string manipulations can be use or do with help of Descriptive programming.
- With the combination of index property, identifying the difficult objects can be easily found by the descriptive programming.
- Programmatic description for an object to use is only possible by the descriptive programming for further child objects.
- An ample – Descriptive Programming is used for page object but succeeding child object used the WinEdit Object Repository, This is incorrect here.
- On the opposing for both WinEdit and page descriptive programming is used which will be correct and appropriate and will show the correct result.
|
||
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
Android Install Apps to SD Card Default |
Developer vs Tester a fake competition |
|
|
|
QTP TESTING STEPS | How to Record a QTP Script |
|
||
|
|
|
|
No comments:
Post a Comment