I am verifying the actual vs the input value to make sure
that they been entered correctly. In the Global Sheet I have
a column called Customer with the multiple names in each row
and now I am trying to capture the value during runtime
under the column name Customer_in_Apps.

Somewhat it works but during runtime the values are being
stored in each column vs each row i.e., Customer_in_Apps,
Customer_in_Apps1. Automatically it add columns instead of
rows.

row=datatable.getsheet("Global").GetRowCount
for x=1 to row
datatable.getsheet("Global").SetCurrentRow(x)
Window("Customer Desktop").Window("Customer Tracking
(Privacy").WinObject("TreeView20WndClass").Click 92,244
runtimevalue =
.VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio
n")
Val1=Datatable.Value("Customer",dtGlobalSheet)
Val2 = Datatable.GlobalSheet.AddParameter("Customer_in
_Apps",runtimevalue)

If (trim(Val2)=trim(Val1)) Then

Reporter.ReportEvent micPass, "Customer validation
successful", "Actual Value: " &Val1&vbcrlf& "Customer
Value: " &_Val2
else

Reporter.ReportEvent micFail, "Customer validation
unsuccessful", "Actual Value: " &Val1&vbcrlf& "Customer
Value: " &Val2
End If
Next

Answers were Sorted based on User's Feedback



I am verifying the actual vs the input value to make sure that they been entered correctly. In the..

Answer / ashok kumar

Hi,

Here the problem is 'AddParameter' used inside the 'FOR'
loop, when QTP runs it successfully add your column
successfully at first time, when the second iteration
perform QTP will check whether the column name is exist
previously or not, if it exist it append numeric, that so u
got N number of column, for that u need use 'AddParameter'
before the loop, below is modified of ur script:

row=datatable.getsheet("Global").GetRowCount
Datatable.GlobalSheet.AddParameter("Customer_in _Apps","")
For x=1 to row
datatable.getsheet("Global").SetCurrentRow(x)
Window("Customer Desktop").Window("Customer Tracking
(Privacy").WinObject("TreeView20WndClass").Click 92,244
runtimevalue =
.VbTreeView("vbname:=AppServerTree").GetROProperty("Selection")
Val1=Datatable.Value("Customer",dtGlobalSheet)
DataTable.Value("Customer_in _Apps",dtGlobalSheet) =
runtimevalue
Val2 = Datatable.GlobalSheet.AddParameter("Customer_in
_Apps",runtimevalue)
If (trim(runtimevalue)=trim(Val1)) Then
Reporter.ReportEvent micPass, "Customer validation
successful", "Actual Value: " &Val1&vbcrlf& "Customer Value:
" & runtimevalue
else
Reporter.ReportEvent micFail, "Customer validation
unsuccessful", "Actual Value: " &Val1&vbcrlf& "Customer
Value: " & runtimevalue
End If
Next

Hope.. it will be usefully for you...

Is This Answer Correct ?    1 Yes 1 No

I am verifying the actual vs the input value to make sure that they been entered correctly. In the..

Answer / pitbull

Based on the above recommendation which I added, but the For is
within a For loop and the scripts run by adding a customer with the
info and then the above for loop comes in place and verify the
customer is added and then it goes back to the first for loop and
add another customer and verify again with the second for loop
above. But when the customer are verified I end up getting the two
columns again.

Is This Answer Correct ?    0 Yes 0 No

I am verifying the actual vs the input value to make sure that they been entered correctly. In the..

Answer / ashok kumar

What ever man... don't assign the
'Datatable.GlobalSheet.AddParameter("Customer_in _Apps","")'
line inside the 'FOR' loop, better to write this after the
ur variable declaration part.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Gmail application is there.On that Inbox so many mails are there including naukari mails. On that mails i can select the only naukri mail checkboxes. plz tell the descriptive code for the above..

2 Answers   Impetus,


hi friends i have 4 yrs exp in testing and 2 yrsexp in QTP.currently aim working in mnc in north as a permanent employer .iam looking for job in south is there any openings plz let me know my mail id is bjr@aol.in its very urjent

5 Answers  


How to start recording using quicktest professional (qtp)?

0 Answers  


How can you capture(Read) the values from a Table?

1 Answers  


How to save your test using quicktest professional (qtp)?

0 Answers  






hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....

0 Answers  


i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?

0 Answers  


Can we put more than one action in a single script???? yes or no.....

2 Answers   BirlaSoft,


What is the use of sendkeys.In which cases we Use this sendkey.Pls explain with example.

3 Answers   Cap Gemini,


suppose we recording a web based project so for that we are using internet explorer after that if we execute that script in netscape then script will execute or not and one more thing is to exeute the script in any browser what to do

2 Answers   DigiTech,


How i can test the background color of the records displayed in a Table. Eg i have a .net desktop application and there is a Table(swftable) with records displayed in the grids. i have to validate whether the 1st record is displayed in white background color and 2nd record in light blue background color...But the constraints is that once user click on the first record...the background color changes to grey.......Plze let me now how to validate this with QTP 9.2.

9 Answers   Accenture,


we have one text box and one list box(list box appear in same page or another page) what ever the text enter in text box that must be displyed in list box as first one. for example if we enter 10 in text box that is the 1st item in list box . after that we enter 11 then 11 is the 1st item and 10 is 2nd item. the maximum limit of list box is 10 items. if we enter 11th item the 10th item is deleted and llth one is add as 1st one and 9th one goes to 10th position

3 Answers   Covansys,


Categories