Controlling non-IE based application

S

Sean Nakasone

Hello, I've been previously been using waitr to control a web based
application. The application has been rewritten so that it doesn't use IE
anymore so my watir scripts don't work anymore. I know the application is
still sort of web-based because it still uses *.aspx files. Is there a
way to continue using watir, win32ole or interop? How do I attach to the
window of the application if it runs in vendor supplied exe.
 
S

Sean Nakasone

Yes, you are correct, the vendor said they are using Microsoft Cassini to
create their exe. Knowing this is already a huge help--thankyou. Using
your advice I successfully used netstat -an to see which local port
is being used. But with a known port, how do I use watir to connect? How
do I use IE to browse from here?
 
P

Phillip Gawlowski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean Nakasone wrote:
|
|
| Yes, you are correct, the vendor said they are using Microsoft Cassini
| to create their exe. Knowing this is already a huge help--thankyou.
| Using your advice I successfully used netstat -an to see which local
| port is being used. But with a known port, how do I use watir to
| connect? How do I use IE to browse from here?
|
|
If the application listens on the port (like a webserver),
localhost:port could work.

NB: I never used Cassini, nor watir, nor do I play a user of those on TV.

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan

Let your compiler do the simple optimisations.
Don't strain to re-use code; reorganise instead.
~ - The Elements of Programming Style (Kernighan & Plaugher)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf8FWoACgkQbtAgaoJTgL9mPACggx00wGt824etWXyGsFEUJaox
lSAAoJj+XlJe9lvpex25GkzZSNCtwFrZ
=Scqt
-----END PGP SIGNATURE-----
 
K

Kyle Schmitt

Sean,
Phillip is right. Use IE to browse to
http://localhost:whateverportitchose. You should be able to browse it
from there, and knowing that you can write your scripts.

I don't remember if Cassini always uses the same port, or if it
randomly chooses an unused one, so you may want to look at how to port
scan from ruby.

I'm thinking something ugly like, get an array of open ports when the
app isn't running, use ruby to launch the app you're working on, get
an array of ports now, and blindly assume that the new port is the one
cassini is using... Not pretty but definitely better than manually
finding the port each time (if it changes that is).

--Kyle
 
S

sean_n

Folks, I tried to use an IE to browse to http://localhost:port , port
being substituted by the port number i got from using the "netstat -
an" command. IE gave an error saying something to the effect that it
could not display or open that address. Let me give more background
on the application. It's an website, internal to our company. The
website is run on a remote server using IIS as the web server. The
client used to be IE, but now it's a vendor supplied exe that opens
it's own window independent of IE. I want to control the non-IE
window programatically. I'm hoping to use watir, but correct me if
i'm wrong, but it seems watir only controls IE, correct?
 
K

Kyle Schmitt

Watir currently only controls IE, but development for watir
controlling other browser is in development. No news as to when it
will happen.

If Cassini is being used, it would be running an instance of
IIS+ASP.NET on the client machine. It's still possible it's calling
out to an external server for some things, but it doesn't have to at
all.

What your saying sounds like they are doing some sort of weird hybrid.
Still, it should be independent of the browser: an http server is an
http server for all intensive purposes here. The question becomes
then, how do you get at that.

I'd try all the open ports (tcp -ln) that you can find & can't ID as
standard. Either use the browser to check for an http server, or
telnet to them, and type in "get" then hit enter. IIRC that should
return the index.html from the root directory of the http server.

--Kyle
 
B

Bret Pettichord

Watircurrently only controls IE, but development forwatir
controlling other browser is in development. No news as to when it
will happen.

Actually Watir wraps the IE automation object. If you can find an
alternate way of getting a handle on the object that is embedded in
your application, you could inject it directly into a Watir::IE object
and it would work.

Bret
 
S

sean_n

Actually Watir wraps the IE automation object. If you can find an
alternate way of getting a handle on the object that is embedded in
your application, you could inject it directly into a Watir::IE object
and it would work.

Bret

Assuming I can get the handle to an IE automation object. How do I
inject it directly into a Watir::IE object? The closest thing that I
know of is using the ie attribute of the Watir::IE object, but the ie
attribute can only get the raw ie object, i don't think it's meant to
set it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,290
Messages
2,571,452
Members
48,129
Latest member
DianneCarn

Latest Threads

Top