in a database table there are 3 columns (name ,
marks,grade) , in application after retrieving data from
db to fields name, marks click ok button then grade should
displayed ---for this how to write vb script prgm
Answers were Sorted based on User's Feedback
Let us assume that application is VB application
You can copy and paste in ur PC then analyze u will
understand easily
E.g:
RC=datatable.GetRowCount
msgbox RC
For i= 1 to RC
vbwindow("Form1").vbedit("name").Set DataTable("Name",
dtGlobalSheet)
vbwindow("Form1").vbedit("marks").Set
DataTable("Marks",dtGlobalSheet)
vbwindow("Form1").vbbutton("OK").Click
' Here it will retrieve grade and displays in msgbox
grade=vbwindow("Form1").vbedit("Grade").GetROProperty("text")
msgbox grade
' It places Grade in Run Time Data Table
VbWindow("Form1").VbEdit("Grade").Output CheckPoint("Grade")
' Now we can export that data in to our desired location
Next
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / kk
I feel, I could not understand your question.
I am not sure this syntax is correct, better to check it.
i=Browser().Page().WebTable().RowCount()
For x=1 to i
myData = Browser.page.WebTable().GetCellData(x,2)
'Assume, 2 is the number of Name Column.
allData=myData
'Use different Logic
Next
You can get all the data in those 3 columns.
The last part in your question is not understandable for me.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kk
allData should be declared Globally, outside of any
Loop/Condition.
allData=myData
I am sorry, correction for the above line.
allData=allData & vbcrlf & allData
I would like to know people feed back, about this posting.
| Is This Answer Correct ? | 0 Yes | 0 No |
Can Any One Write How to Write the Script for Child Objects
Hi Friends this is kumar i would like to request to all of you ,please help me to explain real time project with using qtp scripts i know basics of qtp but it won't workout on interviews,pls help awating to reply.
how to generate numbers in between to numbers suppose numbers in between 500 to 1000 in sequencies using vbscript
Hello! i am having two comboboxes.Each having 10 items in it.when i select first item in first combobox,it is not similar in the second combobox.for ex in first combo if it is Hyderabad,in second it should be some chenai or some other item .Write a VBSCRIPT for that?
how qtp identify two objects having same name, supose objects are in same page also with same name,specify spl feature.
Diff b/w Health care domain and Banking Domain?
Hi, I have 2 dropdown listboxes called region and city/area. It needs to select one region(Santa Clara) and one city/Area (Sunnyvale).So I put this in the for loop and I am storing the Items in the variable called itemname. The regions value will get changed,so I used reg expression for this regions. This is my code Browser("MLSListings.com").Page("MLSListings.com").Link("» County/Area").Click Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Check CheckPoint("regions") ListSize=Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetTOProperty("items count") For i = 1 To ListSize-1 Itemname =Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetItem(i+1) Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Select Itemname ................. If I run the script,I am getting the following error, Cannot identify the specified item of the regions object. Confirm that the specified item is included in the object's item collection. Any Help? Thank you, Uma
How will you test a keyboard?
Consider a scenario where there are two action sheets say action 1 and action 2. Can Action 1 take values from action 2 data sheet or vice versa. If so, how?
can we test an windows application using qtp
if Object repository contain x and y properties. we do not know whether they are mandatory or assistive properties. While executing the script qtp will use both the properties or only sufficient properties to identify the object. It means it use OR (or) AND
How we wil do data driven test using chkpts? Plz. give me complete navigation steps for this?