ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
Suppose there are 100 links in a web page and the number of 
links will be changing dynamically from time to time. I 
need code such that every time i had to click on the last 
link of the web page.
 Question Submitted By :: Prasanth
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Suppose there are 100 links in a web page and the number of links will be changing dynamically from time to time. I need code such that every time i had to click on the last link of the web page.
Answer
# 1
Below code will work for your case.

' Set a description object to identify links.
Set oDesc = Description.Create()
oDesc("html tag").Value = "A" 

' Get a collection of links
Set oLinkCollection = Browser("test").Page
("test").ChildObjects(oDesc)
Set obj=oLinkCollection.Item(oLinkCollection.Count-1)
obj.Click
 
Is This Answer Correct ?    2 Yes 0 No
Amarendra Kothuru
 
  Re: Suppose there are 100 links in a web page and the number of links will be changing dynamically from time to time. I need code such that every time i had to click on the last link of the web page.
Answer
# 2
set odesc = decription.create

odesc("micclass").value = "Link"

set n = browser("xxx").page("xxx").childobjects(odesc)

objcount = n.count

browser("xxxx").page("xxxx").link("index:="&objcount).click
 
Is This Answer Correct ?    2 Yes 0 No
Kishore
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
What is object repository?  2
i want know iam working 2+ exp in QTP can i do performence testing (eg:loadrunner) yes r no? IBM6
What is Maximum synchronization time out in QTP(By Default is 20sec). Anybody can answer it. Thanks in advance. Polaris9
how to write testcases for web based insurance,from the script by using qtp.  1
PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME Ordain-Solutions3
Can we create test script with out Step Generator?  4
How can I find out whether a word in a string is existed or not for example "QTP IS A POWERFULL TOOL FOR AUTOMATION" How can i find out whether "powerfull" is existed in the above string or not Could anyone answer it? Livetek3
we have 10 more actions in our test and we are using exit action command to come out from the action if any error s occured.In action 1 if any error occurs control is moving to second action but if we get error in second action exitaction is throwing general run error. Please give a idea to overcome . TCS1
Could any one suggest web site links to learning VB Script for QTP purpose??  2
What is the another extension name of library file. If that is exist than what's the difference between them. Synechron2
Hello, I am learning QTP. I have recorded test for Login page, i have also inserted checkpoint for Email field & when I run test it passed. But when i tried to run test by inserting 'Adding Parameter Values to a Data Table' for email & password field, it pass the first value in both the fields but after that when test run for second parameter values it displays 'Internet Explorer cannot open the Internet site, Operation aborted' & when i analyze test result it displays run time error 'Object disable'. I have also cleared all the history from IE but it is not working. Please help me. Thank you.  2
I want to open a GOOGLE page without recording a test in QTP.Can any one answer me? IBM4
DIFFERENCE BETWEEN WR 8.2 & QTP 8.2? HOW TO INTEGRATE WITH SOME OTHER TOOLS? CTS1
If there r 1000 test scripts that were written. If a change to any functionality is to be made then how can we know in which script is this functionality existing. iGate2
What is the difference between functional spec. and Business requirement specification? Infor4
what is defination of system testing? Omax1
Hi guys, can anyone explain me whats the method for reporting the QTP test results to teamlead or non-QA member (developer/PM)? Thanks in Advance!!!!!  2
For Usability testing, which is preferable Automation or Manual?  5
How should i find out whether the cursor is moving horizantally. when tabbing continuously Livetek2
I have 1 to 10 action are there, i want action1 output becomes to action 10 input? pls any can give script for this scenario? AZTEC4
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com