On Jan 6, 6:51 am, Joe Fleck <[email protected]> wrote:
> Hi,
>
> I have found it does work but won't if the browser is not in my
> admitted focus.  I am using a MAC BookPro.  Has anyone else
> experienced this?
>
> Thank you,
> Joe

Most 'send keys' operations emulate typing at the keyboard, and are
generally done at the OS level.  As a result the keystrokes tend to go
to whatever has focus in the UI of the system you are testing on.  You
may need to set focus to the browser window first.  That can mean it's
pretty difficult to do anything else on the system when scripts are
running since you never know when you might lose focus on your current
task.

If you want to do other work on the system while scripts are running,
and the scripts use this kind of thing then your best bet is to run
the tests inside a virtual machine, where what you do on the rest of
your desktop will not affect the focus 'inside' the VM.  If no a mac
look into Virtual-Box, Parallels, or VMWare Fusion.   (another
advantage of this is that you can test on a platform such as Windows
with IE/Firefox/Chrome  so that you are not doing all your testing on
a marginal platform that only a tiny minority of most web users would
be using.  (note I'm not a mac hater.. I'm typing this on a macbook
pro, but for compatibility testing of webapps I mostly use Virtual-Box
VM's that use XP or Win7, and IE/Chrome/Firefox since that's what
around 90%+ of my users will be using.  Using an external monitor, I
can have scripts running in vm's on one screen (to keep an eye on
them) and meanwhile do useful work on the other monitor.

-- 
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]

Reply via email to