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
    Aug 1999
    Location
    bangalore,karnataka,india
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    how to test hyperlinks in applets using JavaStar?

    hi,
    I'm just inquisite and i would like to know since JavaStar can be used to test applets also and since applets come embedded with Hyperlinks...how can they be tested using JavaStar...

    thanks,
    sangeethamv

  2. #2
    Member
    Join Date
    Jul 1999
    Location
    SC, CA, USA
    Posts
    49
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to test hyperlinks in applets using JavaStar?

    Since I don't test applets, just stand-alone Java apps, I'm going to have to make an educated guess here.

    The most straight-forward approach would be to ascertain the x/y coordinate where the hyperlink appears within the Applet, and then to use "multiClick( x, y, 16, 1 )" to perform a click within this hyperlink.

    Generally speaking, you can direct a click or keystroke to any component within the target application or Applet. The trick is to determine which component you actually want to click in. The easiest way to determine this is to record a script and click inside the target application or applet where you eventually want this click to occur.

    If the hyperlink is always going to appear in the same location, then it's easy. You can just record a script to click in this location.

    However, if the layout is dynamic and the location of the hyperlink is likely to change, then you'll need to determine it's location programmatically.

    First you'll need to determine the component type of the component which "contains" the hyperlink. This can be done by recording a script and looking at the component type within the recorded script.

    Then you need to read about the API to this type of Java component. Unless the engineers have created some weird type of custom control you can get the documentation for the component from "http://java.sun.com/products/jdk/1.2/docs/api/". I use this web site on a daily basis.

    You'll need to crawl throught the component looking for the data that corresponds to the hyperlink that you want to click in. Once you've found the matching data for the hyperlink you'll need to get the x/y location within the component somehow. This differs from component to component.

    Hope this helps.

    mark young - software engineer

    PS - once you know which component that you're working with I may be able to offer more specific suggestions. I have done this type of stuff a lot with JList, JTree, and our own customized text windows. It's not that hard, it's just a lot of detail.

  3. #3
    Junior Member
    Join Date
    Jul 1999
    Location
    London, England
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to test hyperlinks in applets using JavaStar?

    Hmm,Mark You can't just multi-click into the the applet page. What if the browser isn't written in Java. But you're on the right lines....

    Questions
    1) What browser are you using ..Appletviewer/HotJava/Netscape/IE4,5?

    2) Do you need to test with different browsers?

    3) If the browser is written in Java then what mark has suggested may work, as long as the browser always renders the links in the same place.

    Let me know what browsers you intend to use.

    Wayne
    Java Testing Consultant
    Scientific Computers Ltd www.scl.com
    Wayne Byrne
    Java Testing Consultant
    Scientific Computers Ltd
    www.scl.com

  4. #4
    Junior Member
    Join Date
    Aug 1999
    Location
    bangalore,karnataka,india
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to test hyperlinks in applets using JavaStar?

    hi wayne,
    i need to test it on different browsers..even browsers that are not written in java...mainly on netscape and internet explorer...?
    any solutions?
    sangeethamv

  5. #5
    Junior Member
    Join Date
    Jul 1999
    Location
    London, England
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to test hyperlinks in applets using JavaStar?

    Hi,

    Okay, Let's discuss the solutions that exist.

    1) Using Appletviewer.

    As we know Appletviewer is supplied as part of the JDK, and is used to view.....Applets which are embedded in HTML.
    Javastar can deal with this directly as it is written in Java, and as you know Javastar loves Java. It is the default viewer for applets. You shouldn't have to many problems with this guy.

    2) Using HotJava.
    This can be done. What you do is actually run is HotJava as the app under test. You set the default page of HotJava to point to your applet (or html file), which will then obviously run your applet. Then you use Javastar as normal.

    Hint: make sure you increase the minimum and maximum heap size for your VM. Java command line arguments (again you set these in your project file) -ms4m -mx40m.

    3) For Netscape and IE.
    These require the use of the Java Plugin. I'm not going to repeat the docs in this email BUT it is fully documented. Also remember to download the javastar-JPI.zip file available at the external download page for Javastar. This comes with a readme to explain how to move rt.jar, and has the html page which will load in Javastar.

    If you need more help email me at wayne@scl.com and I'll see if the force can help....

    Wayne.


    ------------------
    Wayne Byrne
    Java Testing Consultant
    Scientific Computers Ltd
    www.scl.com
    Wayne Byrne
    Java Testing Consultant
    Scientific Computers Ltd
    www.scl.com

 

 

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 10:46 PM.

Copyright BetaSoft Inc.