Hi Chuck,

Instead of being given a fish, I'd rather be taught to fish...while
Watircraft can make things a little more convenient, I'd rather have a
deeper understanding into what makes a framework successful.  Are
there books/websites out there that can shed some light on this
subject?

BTW, thanks for the link Leigh!  I'm going to check that out.

-George

On Apr 21, 3:25 pm, Chuck van der Linden <[email protected]> wrote:
> If you are using the watircraft framework (I think you were in the
> training in portland?) then it's supposed to take care of scope, and
> you can just use 'browser' (or ie or ff  or
> whatever_makes_sense_to_call_your_browser_instance  if you like typing
>
> On Apr 21, 3:18 pm, George <[email protected]> wrote:
>
> > Thanks for the response, Tiffany.  Maybe that's what I wondering...am
> > I using global variables properly?  The way I have things set up now,
> > I have a separate file to store my application controls
> > ($browser.text_field, etc.), and then I have my main script where I
> > call those controls.  I'm assuming the browser needs to be globalized
> > since they're being shared between multiple scripts.
>
> > On Apr 21, 11:10 am, Tiffany Fodor <[email protected]> wrote:
>
> > > Hi George!
>
> > > It all depends on your framework and how you're using global
> > > variables.  I'm currently using a simple Test::Unit framework and my
> > > browser variable is a global variable ($ie).  Since I use that one
> > > browser for all my tests and it's easier than passing a local or
> > > instance variable to all my test classes and methods, I don't see a
> > > problem with it.
>
> > > Global variables exist for a reason and used properly, can be a good
> > > option.
>
> > > Just my $0.02.
>
> > > -Tiffany
>
> > > On Apr 21, 10:08 am, George <[email protected]> wrote:
>
> > > > Hello folks,
>
> > > > As I've been learning Watir, I'm becoming more aware that assigning
> > > > global variable to a browser (or assigning one to anything for that
> > > > matter!) is a huge no-no.
>
> > > > So, I guess my question is...should I change the variable type from $
> > > > to @?  And if yes, will it understood by other custom libraries I
> > > > include in my main script?
>
> > > > I hope that makes sense...
>
> > > > Thanks,
>
> > > > George- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to