Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capture runtime fax order number
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi everyone.. I have a small problem...

When we record a test with launch flight reservation application + Login + insert order + fax order + close.. then when we play this test, it fails...

I realise that this happens because when we please the test then the order number increases.. i.e if order number was 100 while recording then it increases to 111 when we play the test again.

Can someone advise how I can capture the run time fax number so that when I replay my test then it run as passed. (using parameterizing and data table)

Also I am a beginner to QTP so please do not advise how to do it by writing scripts.. i wont be able to understand Sad ....
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
To do so...go to object repository--->Under Flight Reservation window, click on Fax Order No.100( number could be different in your repository).On the right hand side after you click on Fax Order No.100 you would see the properties of that dialog box.User regular expression .* for text property.
To do so click on the value of text property then click on the icon <#>..."value configuration options" dialog box pops up..in the text box change Fax Order No.100 to Fax Order No.* and select the check box Regular Expression.YOu would see another pop up "Do you want to add the backslash(\) before each special character in order to treat it literally..click on "No".Then click on ok and re run the test
Please dont hesitate to post ..if you didn't get this..Smile
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Thanks a lot Rajiv... I just figured it out using regular expression and it is working fine.. just like u guidedme

what I want is that I want to capture run time order number in my data table... then want to configure the run time order number with the "Fax order No. " in Object repository.

I have summerised what I did below -:
1 > recorded test with login + insert order + fax + close
2 > went to "inser Order" line in expert view so that the correct flight booking window is highlighted in Active Screen.
3 > In active screen right clicked on "order number" box and selected " Insert Output Value"
4 > in object selection window "WinEdit : order num" > ok
5 > In output value property box.. selected text property... modify
6 > In Output Option window.. output type = datatable, Name = ord_num, location in data table = global
7 > Insert statement after currnet step.

My intension behind these steps was that the run time order number can be captured in data table under "ord_num" coloumn.

Now I want that this run time order numebr which is being captured under coloumn "ord_num' of datatable can be assigned to "Fax Order No." object in Object repository so that when I run the test, the run time order number gets configuured with "Fax Order No." in my object repository.

I guess I am trying to do it a complicated way.. but was just wondering possibly how this can be done
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
yeah you can achieve that using setTOProperty(set Test Object property)
Code:
iNum=DataTable.Value("ord_num",Global)  'Retrieving order number from data table
strOrderNum="Fax Order No."&iNum
Window("Flight Reservation").Dialog("Flight order No.").setTOProperty("text")=strOrderNum 'assigning
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Should I download every patch in order to UFT recognize the Chrome and FireFox browse jesusisaac 6 5,329 08-25-2016, 05:03 PM
Last Post: Ankesh
  Automating SAP Sales Order Dwarak Calayampundi 0 1,715 06-09-2016, 09:28 AM
Last Post: Dwarak Calayampundi
  How to get data from data table in Ascending order dipashri 1 3,749 01-28-2014, 09:54 PM
Last Post: jacosta
  Verify the order of web links bpetters 3 2,743 04-16-2013, 04:04 PM
Last Post: sshukla12
  Sort Order Check automation2012 2 4,731 03-26-2013, 02:54 PM
Last Post: automation2012

Forum Jump:


Users browsing this thread: 1 Guest(s)