SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Not able to identify Javaedit Object

    Hi,
    I m trying to enter data in the Javaedit Edit box through scripting.

    DP for performing this is as follows:
    Browser(ObjBrowser).Page(ObjPage).ActiveX(Activexv ersion).JavaApplet(FormAppletObject).JavaEdit(ORPr opertyDataSet).Set TestData

    Its not working. I recorded and playback the smae thing through QTp, and works fine. But this is not working when i m trying to do it though scripting.
    Error i get is:
    Cannot identify the object "[ JavaEdit ]" (of class JavaObject). Verify that this object's properties match an object currently displayed in your application.
    Function file: D:\QTP Framework\FunctionLibraries\CommonFunction.vbs
    Line (1255): " Browser(ObjBrowser1).Page(ObjPage1).ActiveX(Active xversion).JavaApplet(FormAppletObject).JavaEdit(OR PropertyDataSet).Set TestData".

    I have specified the properties of Javaedit control i wnat to work on. this control is in a form.
    Heirarchy is as follows:
    Browser-Page-Activex-applet-javaobject-java0bject-javaobject-javaedit.

    Kindly give me inputs how to get it done.
    Thanx in advance.

  2. #2
    Junior Member
    Join Date
    May 2008
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Not able to identify Javaedit Object

    I m using QTP 11. Java update is 18

  3. #3
    Moderator
    Join Date
    Oct 2010
    Location
    Norway
    Posts
    3,265
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Not able to identify Javaedit Object

    Sandeep,

    Can you post the properties/ values, that you have used here? May be you are missing to handle the special characters.
    Rajkumar

  4. #4
    Junior Member
    Join Date
    May 2008
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Not able to identify Javaedit Object

    thanx for reply.

    this is the property of one Javaedit control:

    to_class|JavaEdit|attached text|Address

    QTP uses same properties to identify this control when i record the operation and playback it.

    But through my script its not identifying this object.

  5. #5
    Junior Member
    Join Date
    May 2008
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Not able to identify Javaedit Object

    i tried highlight feature.
    it worked till : Browser(ObjBrowser1).Page(ObjPage1).ActiveX(Active xversion).JavaApplet(FormAppletObject).highlight

    But when i tried below one
    Browser(ObjBrowser1).Page(ObjPage1).ActiveX(Active xversion).JavaApplet(FormAppletObject).JavaEdit(OR PropertyDataSet).highlight

    it gave me an error that "Object is no longer valid"

  6. #6
    Moderator
    Join Date
    Oct 2010
    Location
    Norway
    Posts
    3,265
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Not able to identify Javaedit Object

    Can you post the values for these properties?

    to_class|JavaEdit|attached text|Address
    Rajkumar

  7. #7
    Junior Member
    Join Date
    Aug 2011
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Not able to identify Javaedit Object

    Try something this, and you can edit the 2 x oDesc lines to suit the circumstance:

    Dim oDesc
    Dim colObject
    Set oDesc = Description.Create
    oDesc("to_class").value = "JavaEdit"
    oDesc("attached text").value = "Address"

    Set colObject = Browser(ObjBrowser1).Page(ObjPage1).ActiveX(Active xversion).JavaApplet(FormAppletObject).ChildObject s(oDesc )

    msgbox colObject.Count

    (or if there's more than one object, try this option instead of the msgbox line)

    For x = 0 to colObject.Count - 1
    colObject(x).Highlight
    Next

  8. #8
    Junior Member
    Join Date
    May 2008
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Not able to identify Javaedit Object

    hi thanx for the help.

    I tried ur solution and it worked. i declared the java edit object properties in the function rather than fetching it from the excel file and it worked.

    Problem is there are 9 to 10 java edit objects on the page. Actually its a "FORM" which run through applet. by this solution i will have to write 10 different functions.

    i wonder why fetching the same properties from the excel file is not working.
    can u suggest some workaround...any inputs would be appreciable.

  9. #9
    Junior Member
    Join Date
    May 2008
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Not able to identify Javaedit Object

    ...thanx everyone.i got it....corrected the function through which i was fetching values from excel file.its working perfectly.

    Thanx everyone....

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:56 AM.

Copyright BetaSoft Inc.