Micro Focus QTP (UFT) Forums
Run time error - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Run time error (/Thread-Run-time-error--6842)



Run time error - RPS_QTP - 09-26-2012

[attachment=1136]Set objLink = Description.Create()
Code:
objLink("micclass").value = "Link"
Count=0
Set AllLinks = Browser("title:=Gmail.*").Page("title:=Gmail .*").ChildObjects(objLink)
For i=0 to AllLinks.Count-1
boldTag=AllLinks(i).GetROProperty("innerhtml")
If instr(boldTag,"<B>")<>0 AND instr(boldTag,"class=ts")<>0 Then
     Count=Count+1
End If
Next
msgbox "You have " & Count &" unread mail(s)"
@ above code
im getting "general run time error"


RE: Run time error - krr - 10-04-2012

Problem is that you are using extra space in page properties, because of which QTP is unable to Identify. Remove that space and it works.

Code:
Browser("title:=Gmail.*").Page("title:=Gmail:P.*")
space is there where I have inserted the smiley.