From: The NaztyBoys on
On Aug 5, 9:15 am, Roger Pack <rogerpack2...(a)gmail.com> wrote:
> Matthew Barnes wrote:
> > I'm curious if it is possible to send text to a window or web
> > application.  I am using the firewatir library, but I don't think you
> > can do it with that, so just wondering if it is possible with Ruby
> > itself.  Thanks!
>
> watir itself can populate fields, can it not?
> -r
> --
> Posted viahttp://www.ruby-forum.com/.

Yes it can, but the fields in are encrypted in the html source, so it
is a random string each time you load the page. I am using ruby on a
linux box right now, but I guess if my only options are the windows
api I may have to run a virtual machine.
From: Matthew Barnes on
On Aug 5, 1:28 am, Quintus <sutn...(a)gmx.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am 05.08.2010 08:05, schrieb James Britt:
>
>
>
>
>
> > Eric Christopherson wrote:
> >> On Wed, Aug 4, 2010 at 9:35 PM, Matthew Barnes
> >> <bbaarrnne...(a)gmail.com> wrote:
> >>> I'm curious if it is possible to send text to a window or web
> >>> application.  I am using the firewatir library, but I don't think you
> >>> can do it with that, so just wondering if it is possible with Ruby
> >>> itself.  Thanks!
>
> >> On Windows, you can use Win32::GuiTest
> >> <http://raa.ruby-lang.org/project/win32-guitest/>.
>
> > AutoItX is also very handy for scripting Windows apps and the Win32 API..
>
> > Seehttp://groups.google.com.kh/group/ruby-talk-google/msg/ca78a0fcf1015a05
>
> > for an earlier post I made on this.
>
> If I'm allowed to promote myself...
> I wrote a library wrapped around AutoItX3, available as the au3 gem[1].
> For Linux systems I wrote xdo (based on the xdotool commandline tool),
> but that's undergoing a heavy rework at the moment.
>
> Vale,
> Marvin
>
> [1] See alsohttp://auto.rubyforge.org
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxaaBgACgkQDYShvwAbcNmf/wCgnRCEOUPriSy3hqXSrzx5Hxci
> rywAoJEw1spMEuj1mtqR1qvrMzvc1706
> =xzxV
> -----END PGP SIGNATURE-----

I am on a linux box so the win32 api wont work or autoit, but I will
def check out your xdo tool! Thanks!
From: Matthew Barnes on
On Aug 5, 9:15 am, Roger Pack <rogerpack2...(a)gmail.com> wrote:
> Matthew Barnes wrote:
> > I'm curious if it is possible to send text to a window or web
> > application.  I am using the firewatir library, but I don't think you
> > can do it with that, so just wondering if it is possible with Ruby
> > itself.  Thanks!
>
> watir itself can populate fields, can it not?
> -r
> --
> Posted viahttp://www.ruby-forum.com/.

It can, but the tags for these fields are encrypted, so every time the
page loads its a different random string!
From: John W Higgins on
[Note: parts of this message were removed to make it a legal post.]

On Thu, Aug 5, 2010 at 9:45 AM, Matthew Barnes <bbaarrnneess(a)gmail.com>wrote:

> On Aug 5, 9:15 am, Roger Pack <rogerpack2...(a)gmail.com> wrote:
> > watir itself can populate fields, can it not?
> > -r
>
> It can, but the tags for these fields are encrypted, so every time the
> page loads its a different random string!
>


Have you looked at the page with Firebug/Firefinder to see if any pattern
can locate the fields? Firewatir doesn't specifically need to know the name
of the field you want to fill in.

As an example, if the field is located inside the same div every time then
you can walk down to it using the div and then grab the only field inside
the div. That would work the same if it was in the 3rd row of a table every
time or any other concept that can be specified to Firewatir.

For certain (well 95%+), if you can XPath the field then you can get to it
via Firewatir.

John

From: Matthew Barnes on
On Aug 5, 10:53 am, John W Higgins <wish...(a)gmail.com> wrote:
> [Note:  parts of this message were removed to make it a legal post.]
>
> On Thu, Aug 5, 2010 at 9:45 AM, Matthew Barnes <bbaarrnne...(a)gmail.com>wrote:
>
> > On Aug 5, 9:15 am, Roger Pack <rogerpack2...(a)gmail.com> wrote:
> > > watir itself can populate fields, can it not?
> > > -r
>
> > It can, but the tags for these fields are encrypted, so every time the
> > page loads its a different random string!
>
> Have you looked at the page with Firebug/Firefinder to see if any pattern
> can locate the fields? Firewatir doesn't specifically need to know the name
> of the field you want to fill in.
>
> As an example, if the field is located inside the same div every time then
> you can walk down to it using the div and then grab the only field inside
> the div. That would work the same if it was in the 3rd row of a table every
> time or any other concept that can be specified to Firewatir.
>
> For certain (well 95%+), if you can XPath the field then you can get to it
> via Firewatir.
>
> John

Wow, I did not know this, thanks for the info John! I will def check
this out.