Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameters
#1
Not Solved
I have a test that runs through an insurance quote web site with. There are two test iterations. I've parameterised one screen input with two variables in the data table. On the second iteration I'm getting an error because the second variable changes the insurance answer after the calculation and the test does not recognise the second answer. There are two text checkpoints. The second one fails. I've tried using an output values but it did not work. See the attachment. The web site is Can anyone help?
Reply
#2
Not Solved
I can t find the attachment, can you upload it again?

Reply
#3
Not Solved

.doc   QTP Insurance error.doc (Size: 301 KB / Downloads: 80)


Saket,
I have attached the screen prints. The test is to record entering variables into an insurance quotation website www.hibernian.ie\online (car insurance) then get an answer. Add a check point on the quotation answer and parameterise one of the variables and run two iterations. The second iteration fails because the second variable in the data table changes quotation answer. If you could suggest a better way to do the test that is great. I have'nt run any tests yet that involve writing Visual Basic script but I do have some knowledge of VB.

Thank you,

Renser
Reply
#4
Not Solved
I did not find any issue , may be you can try using getroproperty to get the amount or else paste your lines of code from expert view. I would like to have a look on that.

Reply
#5
Not Solved
I did not find any issue , may be you can try using getroproperty to get the amount or else paste your lines of code from expert view. I would like to have a look on that.
[/quote]

Saket,
This is the code. I have made a space where the error occurs.

Code:
Browser("Browser").Dialog("Security Information").WinButton("Yes").Click
Browser("Browser").Dialog("Security Information").WinButton("Yes").Click
Browser("Browser").Page("Hibernian Aviva car insurance,").Image("Get a car quote").Click
Browser("Browser").Page("Car insurance quote and").Image("Get a car quote").Click
Browser("Browser").Dialog("Windows Internet Explorer").WinButton("OK").Click
Browser("Browser").Page("Car insurance quote and").WebCheckBox("acceptedTerms").Set "ON"
Browser("Browser").Page("Car insurance quote and").Image("Get a car quote").Click
Browser("Browser").Page("Car Insurance - Basic").WebEdit("proposer.dob").Set "23/09/1971"
Browser("Browser").Page("Car Insurance - Basic").WebRadioGroup("proposer.gender").Select DataTable("Gender", dtGlobalSheet)
Browser("Browser").Page("Car Insurance - Basic").WebEdit("proposer.contactDetail.email").Set "tt@hotmail.com"
Browser("Browser").Page("Car Insurance - Basic").WebList("proposer.districtCode").Select "Dublin 6"
Browser("Browser").Page("Car Insurance - Basic").WebRadioGroup("licenceDuration").Select "5"
Browser("Browser").Page("Car Insurance - Basic").WebList("proposer.drivingHistory.licenc").Select "Full Irish"
Browser("Browser").Page("Car Insurance - Basic").WebList("proposer.drivingHistory.ncdYea").Select "1"
Browser("Browser").Page("Car Insurance - Basic").WebList("proposer.drivingHistory.ncdSou").Select "Insurance Policy in your own name"
Browser("Browser").Page("Car Insurance - Basic").WebList("proposer.drivingHistory.curren").Select "FBD Insurance"
Browser("Browser").Page("Car Insurance - Basic").WebList("proposer.drivingHistory.penalt").Select "1"
Browser("Browser").Page("Car Insurance - Basic").WebList("proposer.drivingHistory.annual").Select "5,001 - 10,000 miles / 8,001 - 16,000km"
Browser("Browser").Page("Car Insurance - Basic").WebRadioGroup("policy.numOtherHibPolicies").Select "0"
Browser("Browser").Page("Car Insurance - Basic").WebRadioGroup("vehicle.hybrid").Select "N"
Browser("Browser").Page("Car Insurance - Basic").WebList("vehicle.make").Select "Ford"
Browser("Browser").Page("Car Insurance - Basic").WebEdit("vehicle.dateFirstRegd").Set "1999"
Browser("Browser").Page("Car Insurance - Basic").WebEdit("vehicle.registrationNumber").Set "99D4536"
Browser("Browser").Page("Car Insurance - Basic").WebRadioGroup("vehicle.typeOfFuel").Select "P"
Browser("Browser").Page("Car Insurance - Basic").WebEdit("vehicle.cc").Set "1200"
Browser("Browser").Page("Car Insurance - Basic").WebEdit("vehicle.approxValue").Set "7000"
Browser("Browser").Page("Car Insurance - Basic").WebRadioGroup("vehicle.leftHandDrive").Select "N"
Browser("Browser").Page("Car Insurance - Basic").Link("Get your quote").Click

'The following line is where the error happens on the 2nd iteration
Code:
Browser("Browser").Page("Car Insurance - Quick").Link("€868.54€910.13€41.59Just").Click

Browser("Browser").Page("Car Insurance - Quick").Check CheckPoint("Quote")
Browser("Browser").Page("Car Insurance - Quick").Link("Price breakdown").Click
Browser("Browser").Page("Car Insurance - Quick").Link("Basic Details").Click
Reply
#6
Not Solved
This is because in the second iteration QTP does find a link with the text as in the OR.
try regularising the text of Link in your repository. May be something like ".*Just" will do.
let me know the out come.

also, always put your code in proper tags that makes the post much readable.
I am not able to go to the required page on your application today ( web page can not display the page ), so not able to do much with your code.

Reply
#7
Not Solved
Saket,
I am only a beginner with QTP. Some of your answer I don't understand.
Maybe you could give an example of "*just" and "regularising the text of Link in your repository", also using tags (I could not use any of this web sites formatting icons such as Bold, clicking the icon enters [B] into the message.
The web site address iI am performing the test on is http://www.hibernian.ie/online/ then choose car insurance.
Thank you for spending your time.

Renser[/code]
Reply
#8
Not Solved
What he means by "regularizing" is using Regular expressions.

You link object problably has a text value of "€868.54€910.13€41.59Just".

You can change the text value to a regular expression in the OR properties area to ".*Just" which means "any text that ends with Just". Double click the text property of your object to set it to a regular expression and the value.

That way if the link is dynamically changing during your testing it will still be properly identified.

hope that helps.
Reply
#9
Not Solved
Thanks for your help but the problem remains. I change the OR text description to .*Just and the object name to just but I'm still getting an error when the second iteration executes the second insurance quotation. I have attached some screen prints. Can you help?
Thank you


Attached Files Image(s)
   
Reply
#10
Not Solved
Search this forum or in QTP help to know how to make regualr expression in OR.
You will need to regularise the Text property of link.
Some thing like in attached snapshot will help.


Attached Files Image(s)
   

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Set data parameters Mik2s 1 1,536 03-07-2019, 10:18 PM
Last Post: supputuri
  Part of parameters missing when passing between actions skumar007 1 3,033 10-10-2014, 02:00 AM
Last Post: skumar007
  Launching .exe file with parameters magnifyingone 1 3,218 08-28-2014, 06:39 PM
Last Post: dplank
  Need Help Understanding Parameters alex228015 0 2,305 03-18-2014, 12:30 AM
Last Post: alex228015
  New Test Parameters VenkataBonu 6 9,875 12-10-2013, 09:11 AM
Last Post: cflow

Forum Jump:


Users browsing this thread: 3 Guest(s)