SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Silk can\'t find the ID anymore

    Testing a web app, a portal. The user's home page has tabs for selecting which page to go to. In an earlier build during the development, I figured out that I could use the window ID ($*****), which followed a pattern -- it was '$active1' for the first tab, '$active2' for the 2nd, etc. The user could change the "name" on the tab if he wanted, but the ID underneath remained the same. Depending on how many pages he added to his account, each one got a tab.

    OK, I figured out a function that would run through them until $active<LI>.Exists() returned FALSE, so I knew I was at the end. Each loop got the outer "name" on the tab, for a list.

    Now, in the latest build from the developers, SilkTest no longer reports any Window ID at all for the tabs. They are detected as HtmlText items. I've looked through lots of recorded window declarations and it seems none of the HtmlText items are showing any Window ID.

    I still have a copy of the "View Source" from one of the earlier versions of a particular web page, and compared it with the present source, and it's absolutely identical code for the tabs.

    I spoke with the developer, who isn't a Silk expert, but he can follow what I'm describing, and he says there's nothing he's changed in a long time with that part. I can see the code still has "ID=active1" and "ID=active2", etc.

    What could have changed? If HTML has code that specifies an ID, and it used to detect it, what could be missing now?

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

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Westford, MA, USA
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk can\'t find the ID anymore

    what was the winclass initially? did you change any recording options?

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

  3. #3
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk can\'t find the ID anymore

    They're in the source as table cells, with onclick = the javascript that calls the page pointed at. Both before and after, Silk has detected them as HtmlText

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

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    Westford, MA, USA
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk can\'t find the ID anymore

    You're the one who upgraded to SP3 recently, aren't you? Did you wipe out your partner.ini file, so that you lost your recording settings? Go into Record - Window Declarations, click the Options button, and fix the settings so it picks up multitagging, including the control IDs -- whatever configuration you like best. Kill Record - Window Declarations, then start Record - Identifiers. You should see the $ tags now.

    You can prove it with an easier example -- just pop this into a file and view it in your browser.
    &lt;html&gt;
    &lt;table&gt;
    &lt;td ID=foo&gt;Here's a tab&lt;/td&gt;&lt;td ID=foo2&gt;Here's another tab&lt;/td&gt;
    &lt;/table&gt;
    &lt;/html&gt;

    Works for me. I either get $foo/$foo1 or not, depending on my settings.
    -AG

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

  5. #5
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk can\'t find the ID anymore

    not for me ...

    I have all the tag options checked. I did the Record Identifiers and cruised around watching it find identifiers wherever it went. In my browser, it finds all the toolbar stuff at top, but precious little in the content portion of the window. It identifies pushbuttons on the toolbar, but a pushbutton like Search in the Yahoo home page - nothing there. In the app under test here, the only object ID'ed was a combo box.

    I tried your html test, and it doesn't find them, although the cursor does change to a text/insert cursor over them.

    Yes, I did go to 5.5.3. Is this a bug in SP3? I know it used to work. The script I had for changing pages with tab, I enjoyed watching it jump over and click the right tab. I used it to go through and delete page tabs added earlier in the test. It was cool. I'm a beginner and I was very proud of figuring it out and mking it work. So I know I'm not dreaming that it used to work.

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

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Location
    Westford, MA, USA
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk can\'t find the ID anymore

    This will be easier to debug if we stick to the simpler example that I submitted, since you are getting different results with that example than I am.

    No, this is not a bug with SP3, because SP3 is what I am using.

    Could you go into your SilkTest program directory, open up your partner.ini file, and tell us what you have listed in the [RecordWinDecl] section? Mine looks like:

    [RecordWinDecl]
    ShowIgnored=TRUE
    MultiTagFormat=Caption,Index,WindowID
    TagFormat=WindowID
    MultipleTags=TRUE
    IDFormat =512
    WinHeight=336
    WinWidth=476
    WinPosY=335
    WinPosX=515

    Also, when you say "it doesn't find them," do you mean that recording isn't seeing the controls at all, or that recording is seeing the controls but not reporting back their $ tags? I thought you meant the latter, but I wanted to clarify. In record - identifiers, are you seeing my two text controls?

    -AG

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

  7. #7
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk can\'t find the ID anymore

    I'm pretty sure now that it's a javascript issue. I see it's simple to cut and paste and build my own little html pages to test. I lifted the code for the tab out of the source for the page, and found that it's javascript doing a document.write(*****) where it used to be just plain html. (I had an old source file saved from about six weeks ago for the same page, identical appearance) Lifting that out, the ID is now visible. So I gotta go find one of the engineers and go further into it.

    Such interesting stuff!

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

  8. #8
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk can\'t find the ID anymore

    I've nailed the exact problem, but now what to do?

    I cut out the code for the tab itself, which is defined as a table cell, and ended up with a little browser page with a rectangle all by itself, with the caption, "Page 1". The real source code for the page is generated by a javascript statement that writes the code for the attributes. I lifted out the attribute code so it's plain html for that, and had an empty pair of script tags

    &lt;SCRIPT Language = Javascript&gt; &lt;/SCRIPT&gt;

    If that pair of script tags is between the
    td tags, the Window ID is not found. If I move it out, so it's still between the table tags but not enclosed by the td's, the ID is seen.

    Well, that's a problem, the javascript is part of the design. The more recent development version needs to discriminate between IE and Netscape, so there's a script for each, inside the cell tags.

    I have a call in to Seque support for ideas.

    I'm trying to think how else I could reliably find the tabs. The thing is that I need to be able to script the Silk to bang on the tabs to do things and then verify.

    I've been hesitant to use the index #. In development there have been changes and other things that I have ID'ed by index have changed their index number. Granted, I can go back and adjust the captures if something changes, but ...

    And with the Window ID as the tag, I had an algorithm that worked for deleting pages reliably. I have a base state for the application, 2 pages named Page 1 and Page 2. As the script adds pages, I need to delete them at the end. Since the developers' code for the Window ID was to call them active1, active2, ...active*, I just did a while loop,

    while (active3.exists())
    -- code for deleting the page--

    each time active3 gets deleted, the page refreshes and what was active4 now becomes active3 and deletes, until only 1 and 2 are left.

    If I try to use the index for the tabs as HtmlText objects, there are bunches of HtmlText items downstream, so the while loop would end up deleting all kinds of items from the page.

    I don't want to use caption, because names of pages can be unreliable. Well, if I add pages from my own script, I should be able to control that, but I prefer to rely on something like a WindowID.

    Location? These scripts will run on different machines, and the pixel location may vary.

    Any coaching? There's gotta be a way, short of telling the developers that they have to change the product so I can write a good Silk script.

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


    [This message has been edited by felecha (edited 09-25-2002).]

  9. #9
    Senior Member
    Join Date
    Jul 2001
    Location
    Westford, MA, USA
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk can\'t find the ID anymore

    I don't know of any magic bullet for this one.

    If the tab captions are changing from build to build, I suppose you could view the source, parse out the html text and get the current list of tab captions from that, and then either flag changes so you'll know when you need to do tag updates, or try to use those strings in a dynamic tagging scheme in your scripting:
    &lt;ParentName&gt;.HtmlText(glsMyStringList[ENUM_VALUE]).&lt;MethodName&gt;()

    There are similar games you could play with # tags or x,y coordinates -- how you code it will have to depend on what is most likely to change from build to build in your application.

    Maybe Segue, or someone else, can come up with something better (some kind of trick I don't know about in Extensions, maybe?). I'll just post this in the meantime so you have some kind of an answer.

    I'll tell you what you could do, though -- post an example html doc so that we can reproduce your most recent problem description and play with it ourselves. You'll get much better results that way.

    AG



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

  10. #10
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk can\'t find the ID anymore

    Actually, I think I've come up with something this morning. The pages in our app all come with two parts -- top and bottom, sensibly enough. The top part's layout is NOT going to change. The tabs will all have a y-location of 73. I checked with the engineer and he assured me that this aspect of things is solid. I've tried resizing the browser window all over the place and true enough, the top section gets wide or narrower, and adjusts its content accordingly, but from top to bottom it never changes. Drag the bottom border of the window up till it disappears, and it never shrinks. So those tabs will surely remain the only HtmlText objects with that y-location, and I can surely code something that will select them out from all the rest by that criterion, and assign them my own numbers, 1, 2, 3, ... and delete until only 2 are left. And if I need captions, I can GetCaption() as needed and pass that to other functions like calling for a click() on a specific tab. I havent worked it all out, but it looks good.

    Thanks all

    Anyone with a better idea or tweak, of course I want to hear it. I check in here all the time

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

 

 

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 08:52 AM.

Copyright BetaSoft Inc.