SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    257
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Handle Chrome/IE in Single Script?

    We need to automate our app using IE and Chrome. Rather than maintaining 2 separate script libraries (1 for IE and 1 for Chrome), is there a smart way to handle both browsers using a single script?

  2. #2
    Senior Member
    Join Date
    Oct 2008
    Posts
    128
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Handle Chrome/IE in Single Script?

    Never worked with Chrome before..
    can you do .. If Else or select case statement ..

    If Browser("version")="internet explorer 8" (you can use strcomp)
    Business flow
    Else if Browser("version")="Google Chrome"
    Business flow
    End IF

  3. #3
    Member
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    257
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Handle Chrome/IE in Single Script?

    Yes, this is the idea that I was thinking of. I know it will be more involved that just specifying the browser. I know there are some objects that will appear differently with IE and Chrome. This will probably mean that when running with IE we will need to point to one particular object and when using Chrome we will need to point to another object withing the OR.
    I was just wondering if anyone had any success doing this with these 2 browsers. Is this even the correct approach? I would really hate to have to maintain a separate script library for each browser we need to test.

  4. #4
    Advanced Member
    Join Date
    May 2007
    Posts
    609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Re: Handle Chrome/IE in Single Script?

    I think keeping two separate ORs and Libraries, then loading the browser specific OR and Lib, would be easiest... provided you name the objects and functions the same. It would cut down on a LOT of If/Then and select statements in one library.
    Dennis Belew

  5. #5
    Member
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    257
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Handle Chrome/IE in Single Script?

    [ QUOTE ]
    I think keeping two separate ORs and Libraries, then loading the browser specific OR and Lib, would be easiest... provided you name the objects and functions the same. It would cut down on a LOT of If/Then and select statements in one library.

    [/ QUOTE ]
    This may end up being the truth after all is said and done. But I would hate to have to maintain a separate library for each browser. This may end up being 4 separate libraries.

  6. #6
    Senior Member
    Join Date
    Oct 2008
    Posts
    128
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Handle Chrome/IE in Single Script?

    You can have same function library for both browsers.

    SomeFunctions.vbs

    Function doSomeWorkOnIE(x,y,z)
    sum=x+y+z
    End Function
    Function doSomeWorkOnChrome(x,y,z)
    sum=x+y+z
    End Function

    You are having multiple functions in one function library. and call that one library in resources.

    Same thing with the OR..
    OR can have objects from IE and Chrome in one OR..

    So in a script you just have to specify which actions you need to do based on browser type..

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 02:29 AM.

Copyright BetaSoft Inc.