how to click the link in webpage by using QTP Script????????
Answers were Sorted based on User's Feedback
Hi this Mahesh I am sending answer for Above Question
step-1
U can write normal script below
Broser(B.Name).Page(P.Name).Link(L.Name).Click
Step-2
If u write function :
Public Function ClickLink(B.Name,P.Name,L.Name)
If Browser(B.Name).Page(P.Name).Link(L.Name).Exist Then
Browser(B.Name).Page(P.Name).Link(L.Name).Click
End If
End Function
Then u Call Function
Step -3
Descriptive Programe
Function linkClick(linkName,linkIndexVal)
ClearDialogs()
strHandle = Window
("RegExpWndClass:=IEFrame","index:=0" ).GetROProperty
("hWnd")
Set gobjBrowser = Browser("hWnd:=" & strHandle)
Set gobjPage = gobjBrowser.Page("index:=1")
gobjPage.Sync
Set objDescription = Description.Create()
objDescription("Class Name").Value = "Link"
objDescription("html tag").Value = "A"
objDescription("name").Value = linkName
If gobjPage.Link(objDescription).Exist(0) Then
gobjPage.Link(objDescription).Click
else
objDescription("index").value=linkIndexVal
If gobjPage.Link(objDescription).Exist(0)
Then
gobjPage.Link(objDescription).Click
else
Print linkName&" Link not Exist"
End if
End If
End Function
Is This Answer Correct ? | 6 Yes | 0 No |
what is description object?
I wanted to create Data Driven test for login page (loginname,password). Password is same for all the loginnames. I recorded the script for one user. I mentioned all the user names in the global excel sheet with the column name as "Loginname". I mentioned 5 loginnames. I selected tools- >datadriver and select loginname. Select parameterize and select parameter all option.Changed the parameter name to "loginname" which i mentioned in the global excel sheet. I executed the script. For the users 2 and 4 only, the script is failing... can anybody explain why the script is failing for users 2 and 4.
what is On Error Resume Next ?
How to change the Default synchronization method time and where?
Explain roles and responsibilites of 2yrs Automation qtp engineer.
how can we compare descriptive programing with a regular expression
How are actions and functions different in QTP?
distinguish between old version and new version QTP features.
how we connect oracle or sql data server database to qtp.
What are the file extensions for per-action, shared object repository files and what is the extension for library files?
Suggest and Define a solution for an application whose objects are not recognized by UFT?
1. I have asked the same question for the third time, but i am getting wrong answers. Pls give me the script to count the number of edit boxes or checkboxes in an windows application screen. In windows application childobject is not working, anyone very urgent