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 |
i am a begnner so am learning Error handling :tried using Recovery manager didnt work i want to be able to handle errors , e.g. if while running the test the folwoing does not show up then how can i use the If then else and goto next step in the test, as in many scenarios it does not show up Browser("The Shopping Channel -").Page("The Shopping Channel -_8").Image("easy pay").Click
When I used random numbers(1 to 9) with regular expression and run the test, it runs only 5 iterations with passed result instead of running all 1 to 9. Please tell me what can be the reason
How u perform exception handling in QTp,what is other name for ths?
How can i get QTP 9.2 software or any webside where i can download ? can anyone help me out , i want to be expert in QTP ,but i don't have the software
If you entered into yahoo mail with your valid user name and password , then you will get " welcome , username " (for example you will see , “welcome, Krishna” ) text on the top of the Inbox page , how can you test the user name is correct or not using QTP?
Hi All,I am in wierd situation that my laptop is installed with QTP11 and os is xp sp3.The problem is the descriptive programming which i have written is working in other laptops and it is not working in my laptop.it is clicking the link which is above the testbox instead of typing it in textbox below it.It is same with the other working scripts written by another person.
How will u test content of an web application with out using chechpoints in QTP 9.2?
your doing one project testing then how u know itis wheather web based application or windows based application?
what is advantage of descripting programming in QTP?
hi frinds i need help .i have 4 + yrs exp in testing and nearly 2 yrs exp in QTP and QC .currently iam working north fast 2 yrs iam looking for job in south is there any openings plz letme know my mail id is pbre1980@gmail.com
Difference between action & Reusable action?
How to start recording using quicktest professional (qtp)?