Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to pass the data frm datatable
#1
Not Solved
Code:
If a="Adidas"Then
        Msgbox "Sucess"
        Val1(j).click
        Exit for
    else
        wait(1)
    End If
Next

In the above code i need to pass the Adidas value from datatable... how to pass the data frm datatable

Code:
Set odesc=Description.Create
odesc("micclass").value="WebElement"
odesc("class").value="rcbItem  "
odesc("html tag").value="LI"
Browser("Link Express - Booking").Page("Link Express - Booking").WebElement("select").Click
wait(2)
Browser("Link Express - Booking").Page("Link Express - Booking").highlight
Set val=Browser("Link Express - Booking").Page("Link Express - Booking").ChildObjects(odesc)
val(4).click

In the above code i need to pass the 4th value from datatable... how to pass the data frm datatable
Reply
#2
Not Solved
syntax for getting values from datatable is

Code:
var=Datatable("<column_name>",<sheet_name>")

e.g., var=Datatable("Place",dtGlobalSheet)
here place is a column name in global datasheet. For local datasheet use dtLocalSheet.

Regards,
Ankesh
Reply
#3
Not Solved
Hi,

You can pass the value through datatable as follows:

Code:
dim Var
Var=datatable.value(columnname,sheetname)

for example Var=datatable.value("Name","dtGlobal")

Thanks
Anurag
Reply
#4
Not Solved
Thanks for the reply
Here the prblm is val(4) means it is the 4th value in the dropdown. how can i pass this from datatable
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PASS/FAIL in QTP badri 3 6,273 12-05-2014, 03:26 AM
Last Post: kiranpol
  Function writes data from datatable to database Fairbanks 0 2,643 06-27-2014, 07:51 PM
Last Post: Fairbanks
  Retrieving data from Txt file into datatable kriday 3 5,849 07-23-2013, 11:04 AM
Last Post: vinod123
  Unable to insert data into datatable Prashanth 1 3,654 05-10-2013, 03:07 PM
Last Post: Saket
  How to pass all rows from data sheet in a function argument richa07 1 3,113 10-15-2012, 03:06 PM
Last Post: srinath_QTP

Forum Jump:


Users browsing this thread: 1 Guest(s)