How to parameterize - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: How to parameterize (/Thread-How-to-parameterize) Pages:
1
2
|
How to parameterize - sudhirzpatil - 01-28-2009 In one of aplication, I have drop down box for each Date, Month and Year to select a Travel start date. After selecting these fields when we go to the next page the selected date appear as mm/dd/yyyy format on next page as text element. In QTP i want to verify if the date appearing on the next page is same as we select on first page. Also if parameterize the dates of first page i want to validated the next page dates. Can you please help me. RE: How to parameterize - manojith1984 - 01-28-2009 Hi sudhir, In the page where the date appears in the format of "mm/dd/yyyy", get this value in a variable and use split function eg: Code: vVar = Split("01/10/2009", "/") Now, you will be able to check these three values with u'r previous page. RE: How to parameterize - bfakruddin - 01-28-2009 Hello Manojith... I hope your answer is not properly suitable for this question. if mm/dd/yyyy have drop down box how many combinations require to set the value.... Can u imagine? Sudhir said that he have drop down box for each Date,month and year... Here we have 3 drop down boxes for Date, Month and Year. Date --> 1 to 31 Month --> 1 to 12 Year --> as per requiement for parametrization we have to replace constants with parameters and pass values from external source like DataTable, Input/Output Parameters, Environment Variables, Random Numbers and Flat Files. Once we set the value in to the application those are the expected values bcoz we got from our testcases or requirements. Once we navigate to next page, here we can found that Objects of drop down boxes or any webobject in the form of Date... Here we have to capture the value if those values are individual, if the date is combined as webobject we have to split with the suitable delimeter and validate with the Expected Values available in our parameters and use reporter events to know how many iterations has been passed and how many failed. For every Iteration we have to navigate from first page to next page and validate and return to previous page. If you want me to give the code with any eg. I will provide you thanks & regards Baba Fakruddin.D RE: How to parameterize - sudhirzpatil - 01-28-2009 Hi Friends the URL of my application is http://newtours.demoaut.com/mercurywelcome.php Here You have to login with username-tutorial password-tutorial Now, in on the first page select the Departure Month as january , Date as 28. Select Returning month as January , date as 30. Now go to secod page. On this page for Depart section you see tha date as 1/28/2009. I want to validate this date with first page selection. for only single selection i am able to script. but for multiple dates such as 24,25,26 how to parameterize it and validate the second page date for these multiple dates. thanks RE: How to parameterize - bfakruddin - 01-29-2009 Hello Friend, This link is not working... please provide working link thanks & regards Baba Fakruddin.D RE: How to parameterize - sudhirzpatil - 01-29-2009 Hi just a slight modification use http://newtours.demoaut.com/ this and same credientials as username- tutorial password- tutorial RE: How to parameterize - manojith1984 - 01-29-2009 Hi Fakruddin, I am really sorry to say that in this scenario there is no concept of combinations 1. As In the first page where we select the Date and Month is to be passed from datatable or any other form of parameterization. 2. Imagine the date, month and year is passed from datatable and you have selected it in the application. 3. Now click on continue which takes to the second page where the date is displayed in the form of "mm/dd/yyyy". 4. As per my explaination...please take this data (second form) and split it i.e vDate = Browser().page().Webelement().GetROProperty("innertext") 'this will give the date Code: vVal = Split(vDate, "/") 5. Compare these array values with the values you have in the datatable. I hope i am answering to the question, please correct me if i am wrong. RE: How to parameterize - sreekanth chilam - 01-29-2009 Hi manojith, Your perception on Manojith query is correct. @sudhir : As manojith said in the above post , you can follow that process. RE: How to parameterize - sudhirzpatil - 01-29-2009 Hi Friends, Above steps are correct only if single date is to be varified. My query is how to check second page date (appearing in mm/dd/yyyy format and as text element ) which get change for every new date selected on first page ( because i am paremeterizing first page dates.) RE: How to parameterize - bfakruddin - 01-30-2009 Code: 'systemutil.Run "http://newtours.demoaut.com/" |