SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Aug 2001
    Location
    Alameda, CA, USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: can I use a method in a tag?

    I've been trying to extend browserChild, but I keep getting an error - 'Window class BrowserChild is already defined in module browser.inc'
    The docs say that if the definition is
    winclass existingClass : existingClass
    returnType methodA()
    Then methodA extends existingclass

    here's the source: Do you see what the problem is?

    [-] winclass BrowserChild : BrowserChild
    [ ]
    [-] String getAct ()
    [ ]
    [ ] String sUrl
    [ ] String sTmp
    [ ] String sAct
    [ ]
    [ ] integer iPos1
    [ ] integer iPos2
    [ ]
    [ ] //sUrl=Browser.Location.GetText ()
    [ ] iPos1=StrPos("&act",sUrl)
    [ ] sTmp=substr(sUrl,iPos1+1)
    [ ]
    [ ] // remove act= from start of sTmp. put result back in sTmp
    [ ] iPos1=strPos("=",sTmp)
    [ ] sTmp=substr(sTmp,iPos1 + 1 )
    [ ]
    [ ] // find beginning of next parameter (starts with &)
    [ ] iPos2=strPos("&", sTmp)
    [ ]
    [ ] // if there is no next param, sTmp is page name
    [-] if iPos2 == 0
    [ ] sAct=sTmp
    [-] else
    [ ] sAct=substr(sTmp,1,iPos2-1)
    [ ] // return page name
    [ ] return (sAct)


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

  2. #2
    Junior Member
    Join Date
    Aug 2001
    Location
    Alameda, CA, USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can I use a method in a tag?

    I'm trying to create window declarations for a site where all the pages have very long URLs and most of them have the same title.
    Each url has one unique parameter "act=xyz" that Id like to use as the unique identifier.
    I've written a method getAct() that returns the act value. Can I use this as a tag id?

    Is there a way to have 'getAct()' used in automatic window declarations?

    thx

    to see the site, http://www.financialengines.com


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

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: can I use a method in a tag?

    Absolutely -- I do this all of the time.
    As long as you end up with a STRING data type -- it can be used as a tag.

    Don't forget that you can put "*" and "?" into the STRING as wildcards as well.


    ------------------
    Rob Kapteyn
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  4. #4
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: can I use a method in a tag?

    The hidden rule is that you can only extend classes that are declared as SilkTest starts up. If you look in startup.inc in the ST directory you will find that only the base client/server classes are loaded, not the browser classes. One way to solve your problem in the add a use statement in the startup.inc file such as:

    use "extend\browser.inc"

    Of course don't forget that you will have to modify the startup.inc file on every system that you have SilkTest installed on to have your code compile on.



    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.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
  •  

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 06:03 PM.

Copyright BetaSoft Inc.