Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to parameterize
#10
Solved: 11 Years, 4 Months, 4 Weeks ago
Code:
'systemutil.Run "http://newtours.demoaut.com/"

datee=browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebElement("Jan 30, 2009").GetROProperty("innertext")
print datee
mon=split(datee," ")
Exp_mont=trim(mon(0))
print "month is :"&Exp_mont
Exp_day=trim(left(mon(1),2))
print "Date is :"&Exp_day
Exp_yr=trim(mon(2))
print "Year is :"&Exp_yr


browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "tutorial"
pwd=crypt.Encrypt("tutorial")
browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure pwd
browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click

fromday=browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromDay").GetROProperty("value")
print "Actual Date is :"&fromday
frommonth=browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromMonth").GetROProperty("value")
print "Actual Month is :"&frommonth

print "Date of 2nd page is     :"&fromday
print "Month of left 3 char's"&left(frommonth,3)

If (left(frommonth,3)=Exp_mont) Then
    reporter.ReportEvent micPass,"Month validation","Month is validated"
    else
    reporter.ReportEvent micFail,"Month validation","Month is mismatched"
End If

If (fromday=Exp_day) Then
    reporter.ReportEvent micPass,"Date Validation","Day is validated"
    else
    reporter.ReportEvent micFail,"Date Validation","Day is mismatched"
End If

'If browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WinButton("View Calendar").WaitProperty("enabled","True",40000) then

browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WinButton("View Calendar").Click


'Window("Select Departure Date").Activate
yr=window("Select Departure Date").WinObject("January 2009").GetROProperty("text")
act_yr=trim(right(act_yr,4))

If (act_yr=Exp_yr) Then
    reporter.ReportEvent micPass,"Year Validation","Year is Validated"
    else
    reporter.ReportEvent micFail,"Year Validation","Year is mismatched"
End If

window("Select Departure Date").Close
Reply


Messages In This Thread
How to parameterize - by sudhirzpatil - 01-28-2009, 01:49 PM
RE: How to parameterize - by bfakruddin - 01-28-2009, 04:41 PM
RE: How to parameterize - by sudhirzpatil - 01-28-2009, 05:46 PM
RE: How to parameterize - by bfakruddin - 01-29-2009, 11:01 AM
RE: How to parameterize - by sudhirzpatil - 01-29-2009, 11:21 AM
RE: How to parameterize - by manojith1984 - 01-29-2009, 12:18 PM
RE: How to parameterize - by sreekanth chilam - 01-29-2009, 01:46 PM
RE: How to parameterize - by sudhirzpatil - 01-29-2009, 03:24 PM
RE: How to parameterize - by bfakruddin - 01-30-2009, 05:57 PM
RE: How to parameterize - by bfakruddin - 01-30-2009, 06:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  parameterize Excel Sheet Name in SQL bjitsidhu 0 2,941 07-20-2014, 08:34 AM
Last Post: bjitsidhu
  Parameterize at different pace, and multiple write to Excel joncfrazier 0 2,669 07-10-2012, 12:05 AM
Last Post: joncfrazier
  Parameterize Excel Columns for 2-Dimensional Array defcon3 2 3,616 06-20-2012, 04:59 PM
Last Post: defcon3
  Parameterize Melody M 11 7,478 11-21-2011, 01:28 AM
Last Post: naunihal
  How to parameterize the value which is in Object repository AdhikariS 4 7,445 09-06-2011, 12:38 PM
Last Post: AdhikariS

Forum Jump:


Users browsing this thread: 7 Guest(s)