Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data Driven Concept
#2
Not Solved
Hi All,

I was able to resolve the issue. Below is the implementation.

Code:
[i]From external location I brought the data to Action1 local datatable.[/i]
Datatable.ImportSheet "C:\mercury1.xlsx","Sheet1","Action1"

[i]I took the Count of Action1 datatable using[/i]
numRows=Datatable.GetSheet("Action1").GetRowCount

[i]I used for loop, so that I can execute the test case based on the RowCount[/i]
For i = 1 To numRows
    DataTable.GetSheet("Action1").SetCurrentRow i
    [b]var_U=DataTable.GetSheet("Action1").GetParameter("Username").Value
    var_P=DataTable.GetSheet("Action1").GetParameter("Password").Value[/b]
    SystemUtil.Run "C:\Program Files\HP\Unified Functional Testing\samples\flight\app\flight4a.exe"
    dialog("Login").WinEdit("Agent Name:").Set var_U
    dialog("Login").WinEdit("Password:").Set var_P
    dialog("Login").WinButton("OK").Click
If window("Flight Reservation").Exist(5) Then
        window("Flight Reservation").Close
        msgbox"1st User logged in"
        elseif dialog("Login").Dialog("Flight Reservations").Static("Err1").GetROProperty("Text")="Please enter agent name" Then
        dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click
        'dialog("Login").Dialog("Flight Reservations").Close
        dialog("Login").Close
        msgbox "User unable to login due to blank username field"
        else
        dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click
        dialog("Login").Dialog("Flight Reservations").Close
        msgbox"SOmething BIG is WRONG"
End If
Next
Set var_U=nothing
Set var_P=nothing

script marked in italic and bold played very crucial role to come over the roadblock.
Reply


Messages In This Thread
Data Driven Concept - by s.tambi - 04-23-2015, 01:55 PM
RE: Data Driven Concept - by s.tambi - 04-23-2015, 03:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need an Excel Driven web Program - Ready to Pay as well mayajain 0 1,712 04-22-2015, 05:21 PM
Last Post: mayajain
  Branching in Keyword driven... vIns 2 3,114 12-23-2011, 06:56 AM
Last Post: vIns
  "Keyword-Driven framework" suresz449 0 2,827 08-26-2011, 11:00 AM
Last Post: suresz449
  key word driven testing goka 0 3,023 02-18-2011, 01:36 AM
Last Post: goka
  keyword driven methodology sim 1 3,271 01-10-2011, 10:41 AM
Last Post: Saket

Forum Jump:


Users browsing this thread: 1 Guest(s)