hi,
In A Table there are some columns and dynamic rows and in each
row in first column there is a link with name. upon clicking on
that link it will show some details. write the vbscript to check
that link without descriptive programming?
Answer Posted / pramod mallick
I think, the table mentioned here is not Excel sheet. It is
a html table on a web page, where 1st colum contains links
with name="name".
So, the porblem is when you 1st record the script, there
are 2 rows (example) and 2 links with description = "name",
so, qtp object repository will add location property to
link (1st link = Location:0, 2nd Link = Location:1 etc..)
When you execute the script, there are 5 links with
name="name" (because of 5 dynamic rows added). Now, how do
you select /click other 3 links (3,4 and 5). Because, you
have only 2 Links recorded.
The 1st and best solution is descriptive programming. The
interviewer asked for without desriptiev programming.
The psedu code is given below.
-- Record only one link (with location:0)
Do
browser.page.frame.Link(location:0).Click
-- Change object description for Link, Update Location
to 1 instead of 0.
bExist = Browser(b).Page(p).Link.Exists
Loop While bExist = True
Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
How do we analyze the checkpoint results?
What are the different types of recording modes in qtp? Which will be used when?
I used the below code to open QTP through VBscript?But i can unable to Invoke QTP...PLZ help me with the correct code to invoke QTP through VBS with description of the code aswell. Dim qtApp 'As QuickTest.Application 'Declare the Application object variable Dim qtTest 'As QuickTest.Test 'Declare a Test object variable Dim qtResultsOpt 'Declare a Run Results Options object variable Set qtApp = CreateObject("QuickTest.Application") 'Create the Application object qtApp.Launch 'Start QuickTest qtApp.Visible = False 'Make the QuickTest application visible qtApp.Open "C:\form", True 'Open the test in read-only mode 'set run settings for the test Set qtTest = qtApp.Test qtTest.Run 'Run the test 'WScript.StdOut.Write "Status is: " & qtTest.LastRunResults.Status 'Check the results of the test run qtTest.Close 'Close the test qtApp.quit 'Close QuickTest Pro Set qtResultsOpt = Nothing 'Release the Run Results Options object Set qtTest = Nothing 'Release the Test object Set qtApp = Nothing 'Release the Application object
how to test load test and block box testing an a web based application pls give ans briefly
wt is the use of multiple questions in QTP
Have you used xml check point in your project? How?
How to replay a script in qtp?
Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?
What are the recording modes in qtp?
Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak
www.icici.com ,after this.. home page wll came, in this page what r the items we r going to test for manual and what are items we r going to test for QTP... explian clearly with example
Explain how to use QTP to check broken links on a page?
Is text area check point supports for web applications?
How to create a standard checkpoint ?
What are the major/ important methods, functions in QTP we use realtime testing