SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    May 2003
    Location
    chennai,Tamilnadu,india
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to write RobotJ proxy class...

    Hi All,

    I am trying to automate a test application which uses a mixture of Java AWT & Custom UI (e.g Symantec,teaset)objects. Robotj is able to recognize the AWT components but *not* the third party components. The Roboj help file makes a mention of writing RobotJ proxy class to help recognize custom objects. Couldn't find anymore documentation related to this proxy class.

    Any help related to documentation/sample code/links in implementing this proxy class is greatly appreciated.

    Thanks,
    Mani

  2. #2
    Junior Member
    Join Date
    Feb 2004
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to write RobotJ proxy class...

    I posted to some question before.
    Here is what I did. Itis for

    Approach to solve such problems

    1. Get necessary objects the GUI has by using XDE's getChildren method recursively.


    2. get properties of each of these with XDE's getProperties method.

    Capture all the property key-value pair. The best way to look at the result is to write the object and properties to a file.

    3. Go through the above output file. Identify the object that you want. This requires some process of elimination.

    4. After this is done, then get the methods and signature to invoke it, for that particular object.
    Use XDE's getMethods that will return these information. ( Write to a file -- an easy way to look at it alter)

    5. Invoke this method with the necessary arguments that is described by its signature.
    You many need to create the required argument object correctly. Get the return value. This will be the result object.
    You can refer to JNI on-line sun java.


    To determine this, I looked through the Object and key-value pair data I captured.

    2. Found out that it uses symantec.itools.awt.MultiList object class

    3. Find out what are key - values needed for getting the data I am interested in in this object
    I wanted an object that can get me the text.
    The method and signature (from the data captured into the file) was getListItems and "()[Ljava/lang/String;"
    Invoke this method on the object like this. Object ob = g2.invoke("getListItems","()[Ljava/lang/String;",null);

    4. rest is manipulation of this object to get all kinds of data.

  3. #3
    Junior Member
    Join Date
    Jul 2004
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to write RobotJ proxy class...

    Can you show me an example?
    I can't understand your explaination.
    Thanks a lot!

  4. #4
    Senior Member
    Join Date
    Mar 2004
    Location
    Scotland
    Posts
    179
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to write RobotJ proxy class...

    It sounds complicated because it is. Basically, when Rational made XDE, they designed classes/methods for each of the GUI objects out there, allowing you to interact with them.

    Now that you have third-party GUI objects, XDE doesn't know what to do with them. What bharathikr is describing is the process that Rational took for each of the standard widgets, to make them testable.

    You may find that the provider of the widgets is a good place to try. It is in their interests to make their toolkit testable as possible as it improves the marketability of the toolset.

  5. #5
    Junior Member
    Join Date
    Jul 2004
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to write RobotJ proxy class...

    Now I know bharathikr's meaning.
    1.use "getMethods" to get all methods of this object.
    2.select method that you want,then use "Invoke" to invoke this method.
    I tried it,it works well.

 

 

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.00%
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 05:48 AM.

Copyright BetaSoft Inc.