Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
last iteartions information is not getting passed into an excel
#1
Solved: 11 Years, 4 Months ago
Hi


I am trying to save the test result and send to a specific column in excel sheet. All the iterations are working fine except the last iteration.

Result is srored in runtime data table but not passing to the excel. This is only happening for the last iteration.
Ex:
Code:
For i =  1 to datatable.getsheet("Action1").getrowcount
       SystemUtil.Run statement
                
       DataTable.SetCurrentRow i
       DataTable.GetCurrentRow
              
   Dialog("Login").WinEdit("Agent Name:").Set   DataTable.Value("Username","Action1") '
   Dialog("Login").WinEdit("Password:").SetSecure DataTable.Value("Password","Action1")
   Dailog("Login").WinEdit("Password:").Type  micReturn  

       Recovery.Activate  
   If  Dialog("Login").Exist Then
      Dialog("Login").WinButton("Cancel")
      TestResult = "Fail"
   else
      TestResult = "Pass"
      Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
   End If
            
DataTable.ExportSheet "C:\Login_TestData.xls","Action1"
DataTable ("Actual_Result","Action1")  = TestResult
                
Next

Could anyone help me to figure out why this is happening.

Thanks
Reshma
Reply
#2
Solved: 11 Years, 4 Months ago Wink 
Hi

Now the code is working.

Code:
DataTable.ExportSheet "C:\Login_TestData.xls","Action1"
DataTable ("Actual_Result","Action1") = TestResult

'It should be other way around

DataTable ("Actual_Result","Action1") = TestResult
DataTable.ExportSheet "C:\Login_TestData.xls","Action1"


Regards,
reshma
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Click after CheckProperty to a WebElement passed via Function argument fails naruoga 0 1,160 02-28-2019, 11:46 AM
Last Post: naruoga
  Object identified despite having no information mjt 1 2,127 09-14-2015, 08:25 PM
Last Post: mjt
  Function return value is not passed during the 3rd iteration premanand1979 0 2,261 10-16-2014, 09:40 PM
Last Post: premanand1979
  get cell data and frame information excellentpawan 2 2,882 06-21-2013, 02:35 PM
Last Post: vinod123
  Need information on disabled text box. sambu240 3 4,044 08-18-2012, 10:03 AM
Last Post: ravi.gajul

Forum Jump:


Users browsing this thread: 1 Guest(s)