SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Sep 2001
    Location
    Milford, NH
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Select item from treeview with / (forward slash) in name

    I have an issue with selecting an item in a treeview where the item has a / (forward slash) in it. Here is an example

    Windowname.mytreeview.Select("itemwithslash/")

    SilkTest does not recognize the treeview item and returns the message:

    *** Error: Item 'itemwithslash/' was not found

    I have tried replacing the / with a ? (question mark) and a * (asterix) in the select, but it still does not find the treeview item. If there is no slash in the treeview item, select works fine. If I try replacing a character with * or ? in an item that has no slash, select works fine as well.

    This is a Java application, so the class that is being used is JavaJFCTreeView. I am using 1.3.1_01 of the JDK. I am on SilkTest 5.5 SP1, Windows 2000 Has anybody encountered this?

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

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Select item from treeview with / (forward slash) in name

    I'm not so certain that the slash is the issue. This is particularly the case since the item is not picked up with other characters there as well.

    In the past, I've had to read Java Trees into a list of string and then walk that list to work with the items in the Tree. Sometimes you have to get the index of the item and then select it by index.

    Just out of curiosity, is this the root element in your tree? I've found that to be particularly problematic. Also, note that Silk sees the upper elements of a tree as part of the node's name. So, for example, if you were looking at a tree like Program Files/Segue/SilkTest, you could not call "Select" on SilkTest. You have to pass the entire tree as the node name.

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

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Select item from treeview with / (forward slash) in name

    I think the problem is in fact the slash within the value of the treeitem. I ran into the same problem with my Java app almost 2 years ago. Silk assumes that the slash character is the delimiter for another level in the treeview. I found that sometimes using StrTran to change the embedded slash to a wildcard worked, and sometimes it didn't.

    My solution ended up being pretty complicated, but it was also robust enough to transparently survive quite a few changes to the treeview values and more recently I18N/L10N enhancements to our Silk test frame and scripts.

    Start with my initial post about this topic:
    http://www.qaforums.com/Forum1/HTML/001294.html

    I am attaching a snip-it from my test frame that is my extended treeview class with all of the methods - the Select method is the crux of my solution but this is not everything. The basic gyst is that I use a backslash to delimit the tree levels in variables and constants then have to handle that in special ways on Select.

    If you want/need more detailed info contact me directly at pcostigan@websense.com ... I don't have time to keep "up" with this forum as much as I'd like.

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

 

 

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 07:37 PM.

Copyright BetaSoft Inc.