Quality Testing

Quality is delighting customers

QTP error, Can anyone help me to solve this problem?

Hi,i am beginner in qtp.,Can anyone help me to solve this problem?
y here is getting this error " General run error.
Line (8): "set Links = Browser("name:=Google").page("title:=Google").ChildObjects(oLink)". "
Option explicit
Dim ie, oLink, Links, TotLinks
Set ie=CreateObject("InternetExplorer.Application")
ie.Visible=True
ie.Navigate "www.google.co.in"
Set oLink = description.Create
oLink("micclass").value = "Link"
set Links = Browser("name:=Google").page("title:=Google").ChildObjects(oLink)
TotLinks = Links.count


can any one pls explain me

Views: 213

Reply to This

Replies to This Discussion

Hi ,

To know what the exact issue with your code, is add one of code at the error your code as Msgbox Err.description

this will give you the clear description of error  by that if will be easy for to fix on the error

Thanks,

Ram

Issue with below code:

Browser("name:=Google").page("title:=Google")

Check your object repository has name property.  Usually Browsers identifies using title property.

But I prefer below code: (assumed that you opened only one browser).

Browser("CreationTime:=0").Page("CreationTime:=0")

--Subbu.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service