SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    rsg
    rsg is offline
    Junior Member
    Join Date
    Aug 2001
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating a testcase that supports multiple browser

    I'm trying to create a very basic testcase that can run both Internet Explorer 5.0 and Netscape4. I've searched through the documenation for hours trying to understand how to do this. It clearly states it can be done but I can't get a clear picture on how to do this. From what I can make of the documentation, I should be using browser specifiers and possibly the setBrowserType function. So in the test frame I can identify different tags for objects with the browser identifers and in my testcase use the setBrowserType function but I can't seem to get it working.

    Can anyone explain how to do this or better yet post/send email of some examples. I'm using ST v5.5.

    Thanks,
    Scott

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

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating a testcase that supports multiple browser

    Hey Scott,

    This doesn't work as well as it used to, but yes, Silk has historically done very well as a cross-browser tool. As browsers evolve, however, it is proving a difficult task for Segue devlopers to keep this truth alive.

    Here is the approach our team is taking to this. To begin with we call all our variable information out of an ini file. One of those pieces of data is, 'How many browsers are you supporting?' Let's say there are 6; IE4, IE5, IE5_DOM; IE6; NS4; NS6_DOM.

    Next, we look at the ini file to see, of those six browsers, which of them are set to 'True' for this test run. That call looks like this:

    Now we have a list of browsers that we are using and we need to do a "for each" on the browsers in that list. This is really the heart of your question.

    Here is what that looks like:

    Now we have the 'bt' browsertype and we can actually start that browser. I call a method that lives in the shared include file to do this. Here is that call:

    I hope this has been helpful rather than more confusing. Again, the real heart of your question is in that second code chunk which shows how to establish the browser type for this current test run.

    Good luck!

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


    [This message has been edited by DJGray (edited 10-17-2002).]

  3. #3
    rsg
    rsg is offline
    Junior Member
    Join Date
    Aug 2001
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating a testcase that supports multiple browser

    Thanks, that helps a lot. I do have two questions.

    Are you using the recovery sytem? It seems your not using the DefaultBaseState but doing something similar through your StartBrowser() function and invoking it yourself.

    How do you deal with the declarations of each browser? I'm not clear how to deal with wMainWindow, sCmdLine, and declaring each browser specific tagged objects and if I need to create my own invoke methods.

    Thanks,
    Scott

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

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating a testcase that supports multiple browser

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>
    Are you using the recovery sytem? It seems your not using the DefaultBaseState but doing something similar through your StartBrowser() function and invoking it yourself.
    <HR></BLOCKQUOTE>

    No. I choose to bypass the recovery system, which may be foolish on my part. That is a much-touted feature, and really is pretty cool. There is a basic philosophy I have that says "I want complete control of my test." If I don't code it to happen, it doesn't happen. It is great in a lot of ways, but hurts me in others. We all pick our poison! ;-)

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>
    How do you deal with the declarations of each browser? I'm not clear how to deal with wMainWindow, sCmdLine, and declaring each browser specific tagged objects and if I need to create my own invoke methods.
    <HR></BLOCKQUOTE>

    Well this is where it gets hairy. It used to be that you picked a browser, declared your screens/pages/objects and it just worked!!! As browsers are evolving and the proprietary functions of each "brand" of browser type grow, this is becoming more and more difficult.

    I recommend you do a search on this forum because there have been some enlightening discussions on this very topic. The hot question is, "Which browser do I start recording with / coding against?" There are valid arguments on both sides of this.

    Our practice is to work against IE and then modify for Netscape. We are finding that about 75% of it will work in both browser clients and when we encounter difficulties we do something like if browsertype == Netscape do one thing, else do another.

    Now, on the other issue of the constants... again, I just don't use them. I have a template core.t that I've been developing and modifying for about 6 years and it is linked to a core.inc and core.ini file. If you want to pop me an email at zbelfdink@hotmail.com I'll send those to you. It will become much more clear at that point. The core.t file is heavily commented to walk new members of the team through how we're doing things.

    EVERYTHING is pulled out of that core.ini file; paths, IDs, Passwords, executable names, browser count and type, whether or not to write to html and/or text, URLs and transfer protocol (http: or https: or ftp: ), etc. It all comes out of the ini file. That way the script never needs to be modified. It just holds a variable, e.g. sURL and sURL is defined on various machines by the ini file that lives there.


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


    [This message has been edited by DJGray (edited 10-18-2002).]

 

 

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 03:47 AM.

Copyright BetaSoft Inc.