Micro Focus QTP (UFT) Forums
inbox link in yahoomail site - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: inbox link in yahoomail site (/Thread-inbox-link-in-yahoomail-site)



inbox link in yahoomail site - mansalata - 04-29-2012

hi i am using QTP10. while i m running below code(in attachement) i m getting runtime error as cannot identify object of class .Link


please provide me the solution




RE: inbox link in yahoomail site - Shridevi.Salagare - 04-30-2012

You can try using below code.
By taking dynamic links and clicking on it.

Code:
Set odesc=Description.Create()
odesc("micclass").value="link"

Set links=Browser("").Page("").WebTable("").ChildObjects(odesc)

For i=0 to links.count-1
If links(i).Name="inbox" Then
links(i).Click
End If
Next



RE: inbox link in yahoomail site - sshukla12 - 05-02-2012

Hi,

The inbox link contains a dynamic number i.e. the number of unreaded mails. If this is the case then u can use regular expression in OR 4 the same and then try to execute.

Regards,
Sankalp