Help me to fix the issue

111 views
Skip to first unread message

Pravs

unread,
Jan 3, 2013, 3:51:46 PM1/3/13
to qtp-ele...@googlegroups.com
Here is the simple code iam trying to execute ...
this code goes into else part for if condition statement ... pls let me know how to fix this issue :

' this is the first application for the Data Driven Frame work  using http://www.edmunds.com/calculators/affordability.html
option explicit
Dim vMon_Pay,vCash_Down,vOwed_Trade_In,vRate,vTrade_In,vZipCode,vLoan_Term
Dim vUrl
Dim vZipCodeApp,vMon_PayApp
vUrl= "http://www.edmunds.com/calculators/affordability.html"
vMon_Pay=500
vCash_Down=4250
vOwed_Trade_In=1250
vRate=5.99
vTrade_In=230
vZipCode=90001
vLoan_Term= "60 months"
'open the browser  n goto appln url
systemutil.Run"iexplore.exe", vUrl
'enter values into the appln
Browser("IE").Page("Page1").WebEdit("Monthly_Payment").Set vMon_Pay
print "vMon_Pay  is " &vMon_Pay
'verify from the application
vMon_PayApp=browser("IE").Page("Page1").WebEdit("Monthly_Payment").GetROProperty("value")
print "vMon_PayApp is " &vMon_PayApp

If vMon_PayApp=vMon_Pay     Then
    Print "Monthly Payment from App and script are equal  " &vMon_Pay

    else
    Print " both monthly payment are not  correct" &vMon_PayApp


End If

wait 3
browser("IE").Page("Page1").WebEdit("Cash_Down").Set vCash_Down
wait 3
browser("IE").Page("Page1").WebEdit("Owed_Trade_In").Set  vOwed_Trade_In
wait 3
browser("IE").Page("Page1").WebEdit("Rate").Set  vRate
wait 3
browser("IE").Page("Page1").WebEdit("Trade_In").Set  vTrade_In
wait 3
browser("IE").Page("Page1").WebEdit("ZipCode").Set  vZipCode
Print "Zipcode from the script is :" &vZipCode
'verify from the application
vZipCodeApp=browser("IE").Page("Page1").WebEdit("ZipCode").GetROProperty("value")
Print "Zip code from App is " &vZipCodeApp

If vZipCodeApp=vZipCode     Then
    Print " zip code from App and script are equal "
    Print "Zip code is " &vZipCode
    Print "Zip code from App is " &vZipCodeApp
        else
    Print "both  zipcode are not correct"
        Print "Zip code is " &vZipCode
        Print "Zip code from App is " &vZipCodeApp

End If

wait 2

browser("IE").Page("Page1").WebList("Loan_Term").Select  vLoan_Term
wait 3
browser("IE").Page("Page1").webelement("Calculate").Click



'close the browser
'browser("IE").Close




iTeLearn Help Team

unread,
Jan 3, 2013, 10:31:23 PM1/3/13
to Pravs, qtp-ele...@googlegroups.com
Pravs,

Can you please compare the datatypes of both the compared values. They both must be int or double.

Thanks,






--
You received this message because you are subscribed to the Google Groups "QTP eLearn Team" group.
To unsubscribe from this group, send email to qtp-elearn-te...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtp-elearn-team?hl=en-US.
 
 



--
iTeLearn Help Team
tech...@iTeLearn.com
QTPeLearn.com | SeleniumeLearn.com
Join me on YouTube and LinkenIn
Reply all
Reply to author
Forward
0 new messages