SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jan 2001
    Location
    bangalore
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Enabling Browser support at run time

    Ok...
    Here is the question.. I want to enable extension for Browser at run time and I dont want to have it at the beginning..
    The situation is some thing like this...

    if (some condn)
    {
    Enable extension
    statement1;
    statement2;
    }
    Disable extension..
    I would appreciate if some one would let me know how to do that.
    Thanks


  2. #2
    Guest

    Re: Enabling Browser support at run time

    vijay,
    Below are two 4Test snippets that can be used to change the default browser setting. You need to dis/re-connect to the agent after setting the default browser. FYI - I still include all the browser extensions.

    [-] SetDefaultBrowser(string browserTypeName)
    [ ] // Calls resetSilkAgent() to get Agent to recognize new default browser setting.
    [ ] BROWSERTYPE bBrType = GetDefaultBrowserType()
    [ ] Print("Setting Browser type to:", browserTypeName)
    [-] switch(browserTypeName)
    [-] case "netscape3"
    [ ] SetDefaultBrowserType(netscape3)
    [-] case "netscape4"
    [ ] SetDefaultBrowserType(netscape4)
    [-] case "explorer3"
    [ ] SetDefaultBrowserType(explorer3)
    [-] case "explorer4"
    [ ] SetDefaultBrowserType(explorer4)
    [-] default
    [ ] RaiseError(10, "Invalid argument: Valid arguments are: netscape3, explorer3, netscape4, explorer4")
    [ ] resetSilkAgent()

    [+] ResetSilkAgent()
    [ ] // Gets the name of the localhost. Disconnects from all agents and reconnects to the agent installed on locahost.
    [-] string testMachine = HOST_GetEnv("COMPUTERNAME")
    [ ] //works in NT ... don't know about 95/98 - could use new env var on 95/98 target machines.
    [ ] DisconnectAll()
    [ ] Connect(testMachine)

  3. #3
    Junior Member
    Join Date
    Jan 2001
    Location
    bangalore
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Enabling Browser support at run time

    Thanks for the Info..
    But the question was:
    Enabling Browser support and then disabling it..
    When I start the test case, The browser support is disabled..
    I want to enable the support At run time.. depending on some condn being met..

  4. #4
    Guest

    Re: Enabling Browser support at run time

    This is purely hypothetical and never tested, I believe that if you remove the extend\netscape.inc from the runtime options and in the code

    if so and so
    use 'extend\netscape.inc'
    and do the next thing
    else
    continue doing whatever


    Again never tested it.

    -AJ Alhait



 

 

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 05:50 AM.

Copyright BetaSoft Inc.