SPONSORS:






User Tag List

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

    SetUserOption works once only, then says \"has not been registered\"

    I have a utility function I wrote for a web portal app I'm testing. The portal has multiple user pages, accessed by "tabs" along the top, pretty much like the Forum itself. To get the text off of a tab, I found (with help from Segue Support) I had to do a call to

    [ ] BrowserPage.SetUserOption("ShowBorderlessTables", 1.0, USEROPT_DEFAULT)

    then it gets me down to the level where the ID I need for the page is accessible. At the end of a testcase, I do

    [ ] BrowserPage.SetUserOption("ShowBorderlessTables", 0.5, USEROPT_DEFAULT)

    which gets me back to the regular level I work at.

    I've used the function many times, but the present testcase I'm working on calls it twice. I have to get a page name and store it in a temp variable, then go to where the name gets changed, and come back to get the new name and verify that it was changed correctly. When it comes to the second call to my function for getting the name off the tab, I get an error:

    [ ] *** Error: Function AnyWin::SetUserOption has not been registered

    I've tried planting debug statements at points, and it bails out just when it goes back into my function the second time and reaches the call to the SetUserOption(). But then I watched it in Silk's own debug mode, and to my surprise it walks right through to the end and verifies itself just as easy as pie.

    So I'm doubly baffled. How could it have a completely consistent objection to being called twice in one testcase, and how could it work in debug mode?

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

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

    Re: SetUserOption works once only, then says \"has not been registered\"

    I looked up withoptions in the Help, and it gave an

    Example
    I tried it using the ShowBorderlessTables option, but it looks like that is a user option rather than an agent option? And I was using SetUserOption().

    Silk gave me an error:

    Type mismatch - Parameter aOldValue to function BindAgentOption should be an AGENTOPTION.

    The Help also says:

    Notes

    User-defined functions cannot be called on block entry or exit.

    That seems to explain why I see so many options named in uppercase, whereas this one is not. And I didn't find it listed in AGENT OPTIONS in the reference.

    Am I on any kind of right track here? It may be a hunt.

    Thanks

    F

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


    [This message has been edited by felecha (edited 11-01-2002).]

    [This message has been edited by felecha (edited 11-01-2002).]

  3. #3
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SetUserOption works once only, then says \"has not been registered\"

    Try sticking it into a "withoptions" block. That'll let Silk take care of restoring the original value.


    John


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

 

 

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

Copyright BetaSoft Inc.