05-17-2013, 04:29 AM
Hi All,
I want to export data into different excel rows. Here is my script. I want the TimetakenB2 in second row but it is always override the first row. please suggest.
Thanks
Shayk
I want to export data into different excel rows. Here is my script. I want the TimetakenB2 in second row but it is always override the first row. please suggest.
Code:
'Importing Data file
Datatable.Import "C:\Users\Desktop\Page_Load_Time.xls"
Datatable.GetSheet (1)
'Login Process
StarttimeA1= Timer
Browser("Browser").Page("Page").WebEdit("Account_Name").Set xyz
Browser("Browser").Page("Page").WebEdit("User_Name").Set abc
Browser("Browser").Page("Page").WebEdit("Password").SetSecure 1234
StarttimeA2 = Timer
Browser("Browser").Page("Page").WebButton("Login").Click
If Browser("Browser").Page("Page").WebElement("Store 0133 Deer Valley").Exist Then
Print "Login Process Complete"
End If
EndtimeA2 = Timer
EndtimeA1 = Timer
Calender_Page = Browser("Browser").Page("Page").GetROProperty("URL")
TimeTakenA1 = EndtimeA1 - StarttimeA1
TimeTakenA2 = EndtimeA2 - StarttimeA2
Datatable.Value (1,1) = "Login"
Datatable.Value (2,1) = "Login Page - Calender View Page"
Datatable.Value (3,1) = TimeTakenA2
Datatable.Value (4,1) = TimeTakenA1
Datatable.Value (5,1) = Calender_Page
Datatable.Export "C:\Users\Desktop\Page_Load_Time.xls"
'Navigating to Customer Tab
StarttimeB1 =Timer
Browser("Browser").Page("Page").Link("Customers").Click
If Browser("Browser").Page("Page").WebElement("Find a Customer").Exist Then
Print "Customer Tab Clicked"
End If
EndtimeB1 = Timer
TimeTakenB1 = StarttimeB1 - EndtimeB1
Customer_Page = Browser("Browser").Page("Page").GetROProperty("URL")
Datatable.Value (1,1) = "Click Customer Tab"
Datatable.Value (2,1) = "Calender View Page - Search Customer"
Datatable.Value (3,1) = TimeTakenA2
Datatable.Value (4,1) = TimeTakenA1
Datatable.Value (5,1) = Customer_Page
Datatable.SetNextRow
Datatable.Export "C:\Users\Desktop\Page_Load_Time.xls"
Thanks
Shayk