we have a link in a website or webtable How can we record
link in that table or site? link is not static we don't
know exact location of that link? how ? if u know pls give
reply with script also?

Answers were Sorted based on User's Feedback



we have a link in a website or webtable How can we record link in that table or site? link is not ..

Answer / geeta

rowcount=b().p().webtable().rowcount()
for i=2 to rowcount
set obj_lnk=b().P().Webtable().childitem(i,j,"Link",0)
obj_lnk.click

Is This Answer Correct ?    12 Yes 1 No

we have a link in a website or webtable How can we record link in that table or site? link is not ..

Answer / naaz

Descriptive programming will solve this problem. You have
to write the property name and you can assign the dynamic
value of that property. The problem with descriptive
programming is, if you are using descriptive programming
for the top level object you have to use the descriptive
programing for the child objects also. But if you are using
it for child objects you dont neet to use for parent
objects.

Example of Descriptive Programming:
JavaWindow("title:="&Value12).Activate

here title is the Object Property. And Value12 is its
value. you can use dataTable also for the value

Example:
JavaWindow("title:="&DataTable
("Value",dtLocalSheet)).Activate

Is This Answer Correct ?    1 Yes 0 No

we have a link in a website or webtable How can we record link in that table or site? link is not ..

Answer / akshay soni

for a website
bro=""
url=""
set desco=description.create
desco("micclass").value="link"
with browser("title:=give respctive browser title name")
set lis=page("title:=give respctive browser title name").childobjects(desco)
ls=lis.count
for i=0 to lis-1 step 1
x=lis(i).getroproperty("name")
y=lis(i).getroproperty("url")
print(x&" "&y)

Is This Answer Correct ?    0 Yes 0 No

we have a link in a website or webtable How can we record link in that table or site? link is not ..

Answer / jyotikrushna mohapatra

I just saw an answer which has mentioned above as:

rowcount=b().p().webtable().rowcount()
for i=2 to rowcount
set obj_lnk=b().P().Webtable().childitem(i,j,"Link",0)
obj_lnk.click

but this isn't 100% appropriate code, the script may fail
why
Ex: here we are trying to click on the link through every
row of the webtable, suppose the 3rd row doesn't contain
any link then "obj_lnk.click
will fail because there is no link present in that row so
the exact and write code will be as :

rowcount=b().p().webtable().rowcount()
for i=2 to rowcount
if b().pa().webtable().childitemcount(i,j,"Link",0)<>0
then
set obj_lnk=b().P().Webtable().childitem(i,j,"Link",0)
obj_lnk.click
end if
end for

Is This Answer Correct ?    0 Yes 0 No

we have a link in a website or webtable How can we record link in that table or site? link is not ..

Answer / shekhar

If we know the name of the name of that link then u guyes
can follow the below code....
In the above code how are you getting the value of j(i.e
column no). We are supposed to check each and every row &
column.
so I would like to add few lines in the above code,

rowcount=B.P.Webtable().rowcount
colCount=B.P.Webtable().columncount(rowcount)

For i=1 to rowcount
For j=1 to columncount
If B.P.Webtable().ChildItemCount(i,j,"link")<>0 then
set oLink=B.P.Webtable().ChildItem(i,j."link",o)
''oLink.(your desired operation)
y=oLink.GetRoProperty("Name")
If trim(y)= trim("Name of that link") then
oLink.Click
End If
Exit for
End If
Next
Next

Is This Answer Correct ?    0 Yes 0 No

we have a link in a website or webtable How can we record link in that table or site? link is not ..

Answer / veda

I think with discriptive programing but i don't know how
to use that discriptive programing in this situation.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

0 Answers  


Did you use flatfiles in your projects?At what situation you used it?How can you upload flatfiles?

1 Answers  


How to load a object repository(using VBScript) ... very urgent....

4 Answers  


Hi, When I click on a hyperlink a secondary pop-window will open. In that pop-up window there will be 'N' number of records arranged in with paging option in datagrid table. Each rows contains two columns, one is text and the other is a radio button. I will pass the first column value and based in it the tool have to select the corresponding radio button in that row. Please someone help me how to handle this as am new to QTP.

2 Answers   CTS,


What is the need and applications of learning VB script for a automation(QTP) engineer ain Realtime ?

1 Answers  






How to Identify broken links in QTP

2 Answers   Ness Technologies,


when we right click on the desktop of any operating system we find a menu , consisting of refresh,edit,open,paste and cut etc... how to load the object and object properties of that menu in QTP

3 Answers   iFlex,


can anyone answer this question ........in the DICTIONARY OBJECT....i created the dictionary object in reserved object ok....here i have some sets of values ...now i want to retrieve the item i done too ok.......here my question is now i saved the test and close the qtp tool ,again i opened now i retrieve the same item in the dictionary is it possible ????. friends when i try to do this i am getting empty message box i mean no value will be retrieved ......ans me any one plz...

1 Answers   FSS,


Where we save all scripts in the QTP

5 Answers   Ordain Solutions, Sathya Technologies,


when do we write a script in qtp?(plz give me more then 2 reasons)

1 Answers  


In QTP, As a first step wht we will do before going to start a Automation....when it will be decided that we have to go for a Automatio..and who will decide to go for Automation. Any body can pls let me know.. Thanks in Advance..

1 Answers   Wipro,


I wnnt to learn about QTP Automation Framework,please give URL Address to get more information about AFW.

0 Answers   UHG,


Categories