Write the code for select the 5 values from drop down list.
drop down list having the 10 values.
Answer Posted / balaji
For eg:If the weblist contains some x no. of values and if
we want to select only 10 out of it then
i=browser(..).Page(..).weblist(...).Getitemscount()
For j=0 to i
if j<5 then
browser(..).Page(..).weblist(...).select j
end if
next
This code will retrieve only the first 5 values
| Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
Define Canvas view of UFT?
What does it mean when a check point is in red color? What do you do?
How can we retrieve the Bug Ids which are open&Reopen in status through QTP scrit?Please find the script which i tried... Dim objBugFactory, objBug Dim BugId Set TDConnection = QCUtil.TDConnection Set objBug = TDConnection.BugFactory If QCUtil.IsConnected then Reporter.ReportEvent 0, "Connected", "Connected to server: " + QCUtil.TDConnection.ServerName + chr (13) +"Project: " + QCUtil.TDConnection.ProjectName + chr (13) + "Domain: " + QCUtil.TDConnection.DomainName Reporter.ReportEvent 0, "Current time on server is","==>" & TDConnection.ServerTime Else Reporter.ReportEvent 1, "Not connected", "Not connected to Quality Center" End If If mybug.Status="Open" Then BugId=mybug.DefectId MsgBox BugId End If 'OR**********************************--------------------- -----********************************** If Bug_Fields("BG_STATUS").Value ="Open" Or "Re Open"Then BugId=Bug_Fields("BG_BUG_ID").Value MsgBox BugId End If
Does QTP record on Objects created on XWindows Environment?
How many types of run modes are there in qtp?
What are test settings and global settings?
What will be happen if i load object repository at run time, but it has already associated.
How to handle dynamic objects in quicktest professional?
Explain the views in the QTP GUI?
any body plz send health care domain project to me with explanation any two modules on that project. mail_id: ranjith_99reddy@yahoo.co.in
What is the new version of qtp which is recently released in the market?
Hi I have exp in manual testing and planning to move in automation testing qtp(9.2).So can help me how to automate customer relationship management tool using qtp and vb script this tool already developed so how can I test it whatever maintaining by development team like documents,various options just give the whole life cycle thanks in advance
requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" you must get the text in combo box and need to compare them how
What are the views available in qtp?
What are the common defects found in your project? (in qtp interview)