Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Answer
#1
Not Solved
Question: how will we give values or Testing Data in below function code (in the place of X(0),X(1),X(2),X(3)...etc)

Code of the function is given below
Code:
function journey(byval x)
    with Browser(home)
        with .page(home)
          with .frame(lfrm)
            .image(flights).click
          end with
          with .frame(rfrm)
           .weblist(dcity).select x(0)
           .webedit(ddate).set x(1)
           .weblist(acity).select x(2)
           .webedit(rdate).set x(3)
           .webedit(nop).set x(4)
           .webcheckbox(rtrip).set x(5)
           .webradiogroup(sp).select x(6)
           .webradiogroup(st).select x(7)
           .image(cont1).click
          End with
        End with
    End with
End Function
Please get back to me ASAP

Thanks&Regards
Ravikumar C
Reply
#2
Not Solved
Hi Ravi,

First assign all the data you need to variable x: as follows
x ="ravi,password,10032012,Deniver"

'''once you are into function split the x value seperated by delimitor ,
Code:
Function(x)
x=split(x,",")
''Now x(0) has value 'ravi"
''x(1) has value  "password" etc. You can use these values in the function,

End Function.
Reply
#3
Not Solved
Did my solution answer your query?
Reply
#4
Not Solved
Yes it is ok but not exactly the one i want
Reply
#5
Not Solved
Ravi,

Let me know what are you looking for exactly.
Reply
#6
Not Solved
like without using array and another function
we need to get data from excel sheet and that data we need to substitute
Reply
#7
Not Solved
1.You can import excel to data table and assign the values to the respective fields.

2. Working with excel object to read data directly from Excel.

In these two ways you can work.
Reply
#8
Not Solved
Hi,
We can get data from excel i know that but in the function we have just given one "X" how we will replace all variables in the given function
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)