I Have web table shown below
----------------------------------------|
| orcut | GMAIL | NAUKRI |
|----------|---------|-------------------|
|HOT MAIL | MONSTER | VISIT FACEBOOK |
|----------|---------|-------------------|
|SKYPE ACC | IRCTC | GOOGLE |
---------------------------------------
Here i have 2 question friends..
1.i want to chick the link "VISIT FACEBOOK" is there or not
if it's there i want to click the link
2.here how to find the web table row or column count ...
don't write the excel or data table script here friends
..consider that it's a WEB TABLE
Answers were Sorted based on User's Feedback
Answer / ganesh
One of the solutions is below:
It seems if VISIT FACEBOOK link/web element exists in 2,3
co ordication then below is one of solutinos.
Get the child object using ChildItems method from the 2
(row),3(col) using .ChildItems(2,3,"Link",0) if returns any
object then click on it.
E.g
Set objCh = Browser("A").Page("A").WebTable("A").ChildItem
(2,3,"Link",0)
If objCh.Count >0 then
objCh(0).Click
Else
Print" No link found"
End If
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / kapil
rCount=Browser("title:=ABC").Page("title:=XYZ").WebTable
("name:=Links").RowCount
For r=1 to rCount
cCount=Browser("title:=ABC").Page("title:=XYZ").WebTable
("name:=Links").ColumnCount(r)
For c=1 to cCount
oCount=Browser("title:=ABC").Page("title:=XYZ").WebTable
("name:=Links").Childitemcount(r,c,"Link")
For obj = 0 to oCount-1
Set cObject=Browser("title:=ABC").Page
("title:=XYZ").WebTable("name:=Links").childitem
(r,c,"Link",obj)
If cObject.GetROProperty("innertext")="VISIT FACEBOOK" then
msgbox "Link is there"
cObject.click
Endif
Next
Next
Next
set cObject=Nothing
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / manjunathareddy
1.Answer for 1st Question
" VISIT FACEBOOK" is the 1st Row 6th Column.
If Browser("Browser").Page("Page").WebTable("VISIT
FACEBOOK").ChildItem(1,6,"Link",0).Exist(5) then
Msgbox "Link Exist"
Browser("Browser").Page("Page").WebTable("VISIT
FACEBOOK").ChildItem(1,6,"Link",0).Click
Else
Msgbox "Not Exist"
End If
2.Answer For 2nd Question
Dim mytable,Row,Col
Set
mytable=Browser("Browser").Page("Page").WebTable("WebTable
Name")
Row=mytable.RowCount
Col=mytable.ColumnCount(Row)
Msgbox Row
Msgbox Col
| Is This Answer Correct ? | 0 Yes | 0 No |
What is different command used in command Prompt while using QTP?
How to get Links count in an web application,without descriptive programming?
What is the condition or scenario that leads the use of object spy in qtp? (while recording we can get all the properties) then wat leads to use this?
I am trying to read the rediffmail usign the below code. But facing problem, while i user to get the link of the mail, i am getting all the link of the page, While i just want to get only mail name - link (not all the link of an page) so that i able to read the mail message by clcking on them in qtp. Dim Lnk,Webcheckbox Set Lnk= Description. Create '********* To count and display the webcheckbox Lnk("micclass" ).value=" Link" set LinkName= Browser("Welcome to Rediffmail:" ).Page("Welcome to Rediffmail:" ).ChildObjects( Lnk) LinkCount=LinkName. Count msgbox LinkCount For i=1-1 to LinkCount-1 DataTable.SetCurren tRow(i) DataTable.Value( "Name",1) =LinkName( i).GetRoProperty ("name") Next Waiting for the reply Praveen Saini
OR is full with objects but i want to add 5 more objects,but i tried merging files,shared mode and descriptive ,iwont work.is there any alternative for that
How to execute the test cases using QTP. i.e What is the use of QTP while execution
plz anybody tell me how to explain the architecture of one particular project.plz give me answer for this.....RAJESH
unable to get item from the combobox using descriptive programing. can any one give me the peice of code to schedule the booking from one place to another using DESCRIPTIVE PROGRAMING.
hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this
Where is the resultset of a sqlquery (which is fired by rsobj.open sqlquery,xxxx,xxxx) stored ?
Pls can anybody send me the Recent Technical and Interview Questions Which were asked in IBM(QTP)Automation PLZZZZZZZZZ
Can we test internet application using QTP?