SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Oct 2000
    Location
    South San Francisco, CA, USA
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Tags are not being recognized by Agent

    Dear Folks,
    I am new to SilkTest (am using 5.0.3.1) and am testing a web application with pages with non-unique captions but different contents. The Window Identifier and testcases correctly assign object identifiers to those pages with unique captions but the Agent seems unable to process the approved method for identifying these windows:

    BrowserChild NonUniqueWindow
    tag "[BrowserChild]Non-unique Caption/[ChildClass]Unique Child Tag/.."

    I have tried variations of this but have had no success at runtime. I am using IE5 with the VO. The DOM, at least as I had it set up, did not work either.

    If this method does not work, would the dynamic assignment of tags or some other method get around this problem? Can one customize the tagging function to use the URL or hidden aspects of the page header?

    [Segue also has not been very helpful at all]

    Regards,
    Michael

  2. #2
    Member
    Join Date
    Dec 1999
    Location
    Seattle, WA
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tags are not being recognized by Agent

    one way to hack it is to make your tag a function that returns a string, effectively what the ".." is trying to do, e.g.

    <code>
    BrowserChild MyPage
    tag FetchTag()
    </code>
    where FetchTag is defined as...
    <code>
    STRING FetchTag()
    if BrowserPage.HtmlHeading("something unique goes here").Exists()
    return "#1"
    else
    return "#999"
    </code>

    ... or better yet, as bret did on earlier thread, get devs to make unique page titles. it's not an out of bound request these days to include a core requirement that product must support test automation efforts. it's the 00's after all. :-)

    hope this helps.


    ------------------
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR></BLOCKQUOTE>
    <BLOCKQUOTE]<font size=1 face=Verdana, Arial, Helvetica]quote:</font]<HR]It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR]</BLOCKQUOTE]

  3. #3
    Member
    Join Date
    Oct 2000
    Location
    South San Francisco, CA, USA
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tags are not being recognized by Agent

    Matt,
    Thanks for your advice!! I've been trying this out and have a question:
    I'm wondering whether there are limitations on the tag values that the FetchTag function can return in order for the page to be recognized. Are you saying that the FetchTag function can return an arbitrary string and the page will be recognized?

  4. #4
    Member
    Join Date
    Dec 1999
    Location
    Seattle, WA
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tags are not being recognized by Agent

    only limit is that the string returned must be valid syntax for a tag, which can include strings, wildcards, etc.

    by definition BrowserPage is a special object that is defined as BrowserChild who has tag of #1.

    all we're really doing here is making a function run so that everytime a method is run on your page, Silk first clarifies page contents before assigning the #1 tag (if we just statically assigned #1, other pages would be falsely identified as this one, and you may have "identifier is not unique" errors.

    The one drawback here is LOSS OF RECORDER since recorder will not run the dynamic tag code.
    <BLOCKQUOTE]<font size=1 face=Verdana, Arial, Helvetica]quote:</font]<HR]It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR]</BLOCKQUOTE]

  5. #5
    Member
    Join Date
    Oct 2000
    Location
    South San Francisco, CA, USA
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tags are not being recognized by Agent

    Matt,
    Thanks for the clarification. I haven't been able to get the following code to work:

    [-] window BrowserChild docTNReg1
    [-] tag Fetchtag1()
    [-] STRING Fetchtag1()
    [-] if BrowserPage.HtmlText("Middle Initial").Exists()
    [ ] return "#1"
    [-] else
    [ ] return "#999"

    The Window Identifier just reads the page as
    "BrowserPage.[ChildClass]Agent-assignedID"

    If this type of code will eventually work, do I insert similar functions with different names on each page to assign the tags?

    Thanks for your help

    Michael

  6. #6
    Member
    Join Date
    Dec 1999
    Location
    Seattle, WA
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tags are not being recognized by Agent

    the window identifier is using the RECORDER. a valid test would be to write a quick script to attempt to do something on this page, e.g.

    MyPage.FirstName.SetText("Matt")

    then you can attempt to do same while browser is on another page. you should get "page not found" error because Silk was looking for BrowserChild("#999")...
    <BLOCKQUOTE]<font size=1 face=Verdana, Arial, Helvetica]quote:</font]<HR]It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR]</BLOCKQUOTE]

  7. #7
    Member
    Join Date
    Oct 2000
    Location
    South San Francisco, CA, USA
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tags are not being recognized by Agent

    BOOYAAA! It works!! You're a hero, Matt!!

 

 

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:42 PM.

Copyright BetaSoft Inc.