To get data from table which method will be used in QTP

Answers were Sorted based on User's Feedback



To get data from table which method will be used in QTP..

Answer / nag

to get whole data in web table using loops
run exactly below script(explorer should be default browser
) let me know if i am wrong

Systemutil.Run"https://www.iciciprulife.com/ipru/Current_UnitValue.jsp"
Browser("Browser").Page("ICICI").WebList("navType").Select
"Golden Years"
x=Browser("Browser").Page("ICICI").WebTable("Fund
Name").RowCount
For i=1 to x
y=Browser("Browser").Page("ICICI").WebTable("FundName").ColumnCount(i)
Next
For i=1 to x
For j=1 to y
n=Browser("Browser").Page("ICICI").WebTable("Fund
Name").GetCellData(i,j)
print n

Next

Next
print "no of rows"" "& x
print "no of cplumns"" "&y

Is This Answer Correct ?    2 Yes 0 No

To get data from table which method will be used in QTP..

Answer / mythreyi

In data table we have 2 fields like Uname,pwd
To get data from data table as
username=datatable("uname",dtglobalsheet)
or
username=datatable("uname",1)

Is This Answer Correct ?    1 Yes 0 No

To get data from table which method will be used in QTP..

Answer / shiak ejiaj

DataTable("ColumnName",dtlocalsheet)
DataTable("ColumnName",dtglobalsheet)

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More VB Script Interview Questions

how to write function to validate the number of characters entering into the text box?

2 Answers   TCS,


write a vbscrpit to swap values

2 Answers   Adani,


how to retrive the tooltip by using descriptive programming in qtp?

3 Answers   iGate,


Does VB/Win make standalone .EXE files?

0 Answers  


How to get the background color of a weblist?

3 Answers   Accenture,


How can I write HTML text to the window in VB Script?

2 Answers  


Can anyone help me in write coding to get this pattern * ** *** ****

3 Answers  


HOW TO OPEN NEW TAB USING VB SCRIPT IN QTP?

1 Answers   TCS,


What are the data types supported by vbscript?

0 Answers  


Explain the difference between POST and GET Method.

1 Answers  


Hi Friends, I have an issue like the describe below: I'm using QTP and I'm testing on SharePoint. As you knoe, SharePoint has a customize function for user, so that, If I add an object Web Table at the first time, that object was recognized by "index" and "html tag", after that, if someone change the display of web part, the "Index" of my object was changed as well and QTP unable to select that Web Table. Can you guide me how to identify or anyway to keep that Web Table object as unique object? Thanks a lot.

0 Answers   CSC,


Hi Friends, I am facing some issues with If,else condition,i.e. i am working on some web page for ex:gmail page.now if i want to check if username is incorrect or already exist,i want to display error message in my test report,for this i am using a simple code first,i.e. If Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set "Shekhar.g"= true Then Msgbox ("Username Does not Exist!") Else msgbox ("Welcome !") End If But still i am getting a syntax error If Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set "shekhar.g"= true Then Msgbox ("Username Does not Exist!") Else msgbox ("Welcome !") End If I don't feel any thing wrong in this syntax but i don't understand why it shows such error,i am confused what went wrong,please help me out & do the favor,thanks a lot....

1 Answers  


Categories