You really need to watch your variable scope when you try to thread thing 
like this.  I've run multiple browsers at the same time without issue.  Can 
you post an example of your code so we can help?

On Wednesday, April 2, 2014 5:23:11 PM UTC-4, gunit888 wrote:
>
> I'm working on a script using watir-webdriver, which I'm trying to execute 
> in parallel.  By parallel, I mean that the code spins off a new thread per 
> user designated, and executes the same script for each user, resulting in 
> an additional web browser per user (in our case, Firefox, but I don't 
> believe that is relevant).
>
> The script works fine with just 1 user, I can run through my scenario 10 
> times with a single user, and everything works.
>
> However, when I try to run it with 2 users (2 threads, each with it's own 
> browser), weird things seem to happen. In particular, it seems like things 
> are happening out of order.
>
> For example, part of the script sets a date field, does another step or 
> two, and then tries to submit the form.  However, *sometimes*, the form's 
> field validation indicates that there's an invalid date entered, as if it 
> hasn't fully registered that the date is entered.  It usually gets through 
> an iteration or two before this happens, so I know the code itself 
> "works".  I suspect there may be timing issues, due to the overhead of 
> extra browsers firing up on the same machine.
>
> Trying to run it with 5 users simultaneously is very slow, and it actually 
> throws a WebDriverError, due to being unable to obtain a stable firefox 
> connection in 60 seconds.
>
> Is what I'm attempting here (N simultaneous browsers running on one 
> machine) possible with watir-webdriver?  Can this be done, or is there some 
> fundamental limitation?  Is there another way to accomplish this?
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to