05-27-2011, 10:29 AM
(This post was last modified: 05-27-2011, 11:18 AM by kamalakannan_anandan.)
Hi,
I am new to QTP. I have small doubt, how to select the month name, automatically using for loop.
Ex:
the above example, user manually selecting the month name. inserted of using for loop, it's select all month name in one line
Ex:
when loop is running, it's should select month name from WebList box "January", "February", "March", "May",....
I don't know how to write a script for this condition, Please help me to solve this problem.
Thanks & Regards,
Kamalakannan Anandan
Hi,
Thanks & Regards,
Kamalakannan Anandan
I am new to QTP. I have small doubt, how to select the month name, automatically using for loop.
Ex:
Code:
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toMonth").Select "January"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toMonth").Select "February"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toMonth").Select "March"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toMonth").Select "April"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toMonth").Select "May"
the above example, user manually selecting the month name. inserted of using for loop, it's select all month name in one line
Ex:
Code:
For nRow = 1 To 12
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toMonth").Select "January"
nRow = nRow + 1
Next
when loop is running, it's should select month name from WebList box "January", "February", "March", "May",....
I don't know how to write a script for this condition, Please help me to solve this problem.
Thanks & Regards,
Kamalakannan Anandan
Hi,
Code:
For nFromMonth = 0 To 11
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromMonth").ExtendSelect(nFromMonth)
Wait 1 'Delay Time
Next
Thanks & Regards,
Kamalakannan Anandan