SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    May 2002
    Location
    Chennai, TN, India
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Get the reference

    Hai,

    Can anyone give me some suggestion on how to get the reference of my custom class from silk test.

    Basically I want to record my custom object and get the reference of my custom class, then perform some api calls using that reference. Is it possible using silktest.

    Waiting to hear from you all

    Thanks & regards,
    Mohan

    ------------------

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get the reference

    If I understand you correctly

    You have a custom GUI object which you want to map to the custom class that you have created in silk. and then access some methods that you have put togather in the custom class.

    well you can do that by recording the window and classmapping the custom object with your custom class and then the methods in the mapped class will be available to the object.



    ------------------

  3. #3
    Junior Member
    Join Date
    Jan 2002
    Location
    Santa Clara, Ca. USA
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get the reference

    4Test has an operator "@", at sign, which is used to reference objects, the July 2001 Segue @ Work publication has a good article for it. In order for Silktest to be able to use your custom API it has to know about it. Record Class can be used to capture it or if you have the code it can be pasted into the frame file. Not quite sure if this answers your question(s). -Len

    ------------------

  4. #4
    Junior Member
    Join Date
    May 2002
    Location
    Chennai, TN, India
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get the reference

    Dear All,

    I am new to this silktest tool. From your reply I understand that I have to write a custom class in Silk for the GUI Object and Map the same.

    If I have n number of GUI's then I have to write n number of Custom Class. Is there any other way to perform this. Moreover I want to make my requirement clear

    My requirement is

    I have a GUI class (MyClass) which extends JDialog and I can record this JDialog using silktest. What I need is on recording the window I want to get the reference of the GUI class(MyClass) and from that reference I want use some of the methods which is present in MyClass.

    Please let me know on how to achieve this. It will be of great help if anyone can provide me with some examples.

    Thanks & regards,
    Mohan

    ------------------

  5. #5
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get the reference

    yes it is quite possible

    all you need to do is write up your class and methods in it once you can derive this class from standard base classes provided in silk this way you will have inherited all the methods in the base class and you will write the additional methods in your custom class. once this class is ready you can class map the desired objects to this class and all the methods will be available to these objects. for example

    winclass myDialog : DialogBox
    myMethod1()
    code for method1
    myMethod2()
    code for method2

    window myDialog OpenProject

    now all the methods for mydialog class will be available to OpenProject dialog box of your application.

    Silk provides very limited sort of object orientation so I think it should be used to its maximum.

    Hope this helps

    ------------------

  6. #6
    Junior Member
    Join Date
    May 2002
    Location
    Chennai, TN, India
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get the reference

    Sorry to trouble you again.

    I don't want to transfer all my java class into silk.

    In my Java Application I have lot classes which extends almost all the Base class provided by Java like JPanel, JComponent, JDialog etc. I want to get the reference of my classes in silk by recording the corresponding window.

    Is there any way to achieve this.

    Thanks & regards,
    Mohan

    ------------------

  7. #7
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get the reference

    Yes, there is a way to get to this. I think you want a solution to be posted here? It's almost impossible since we need to have the application in hand. That being said, your not going to get a ANSWER here- simply help.

    Anthony

    ------------------

  8. #8
    Junior Member
    Join Date
    May 2002
    Location
    Chennai, TN, India
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get the reference

    Can anyone point some documents on this.



    ------------------

  9. #9
    Junior Member
    Join Date
    May 2002
    Location
    Chennai, TN, India
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get the reference

    Waiting to get the help from one of you

    ------------------

  10. #10
    Senior Member
    Join Date
    Dec 2001
    Location
    San Jose, CA
    Posts
    102
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get the reference

    araman,

    Just what Automation_guru said, just do the steps.

    1. Map your Java class in SilkTest -- pretty simple.
    2. Extend it to MyClass.
    3. Use syntax of
    window Ref_MyClass = MyClass()

    Use this "Ref_MyClass" object as your reference.

    Michael

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 12:49 PM.

Copyright BetaSoft Inc.