Hi Tarun
My advice would be to make it simple first, rather than passing the
object, just create the object in the same function and use it or the
other way, put all of the code out of the function in the script and
use it. There could be an issue with the Descriptive programming that
those properties you are assigning are not sufficient and passing
object is not an issue.
Sorry, can't try and fix this as Gmail is banned at work..
Regards,
Chandan
On Aug 29, 5:29 am, Emad - QTP Engineer <
qa123...@gmail.com> wrote:
> I am trying but not successful so far.
>
>
>
>
>
>
>
> On Sun, Aug 28, 2011 at 12:47 PM, tarun jain <
mca.ta...@gmail.com> wrote:
> > I'm so sorry.. myP is the object description that we created and passed to
> > the function. plz see in the first mail i sent,
>
> > Many thanks... kindly provide some solution. its very urgent..
>
> > On Sun, Aug 28, 2011 at 10:44 PM, Emad - QTP Engineer <
qa123...@gmail.com>wrote:
>
> >> Copy this
>
> >> Function clicklink(fText, myP)
> >> Option Explicit
>
> >> Dim myO, myP
> >> Set myP = Browser("title:=.*").Page("title:=.*")
>
> >> Set myO = description.Create() <<<<<<< notice you SET myO = something
>
> >> myP = what?
>
> >> On Sun, Aug 28, 2011 at 11:40 AM, tarun jain <
mca.ta...@gmail.com> wrote:
>
> >>> i tried with that also.. updated function
>
> >>> Function clicklink(fText,myP)
> >>> Dim myO, myP
> >>> Set myP = Browser("title:=.*").Page("title:=.*")
>
> >>> Set myO = description.Create()
> >>> myO("micClass").value = "Link"
> >>> myO("html tag").value = "A"
> >>> myO("text").value = ftext
> >>> myO("index").value = 0
> >>> wait(2)
> >>> if myP.link(myO).Exist(1) then
> >>> 'myP.link(myO).highlight
> >>> myP.link(myO).Click
> >>> wait(10)
> >>> clicklink = True
> >>> else
> >>> clicklink = False
> >>> end if
> >>> Set myO = Nothing
> >>> End Function
>
> >>> On Sun, Aug 28, 2011 at 8:33 PM, Emad - QTP Engineer <
qa123...@gmail.com
> >>> > wrote:
>
> >>>> Did you declare
> >>>> myP