Controlling non-IE based application

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.

I’ve been in that situation before: web app is converted to psudo
desktop app by means of embedding an IE element on a local only
asp/asp.net server. I believe it’s commonly done through something
called Microsoft cassini.

If it’s that, and I’m gonna guess it is, you’ve got a chore infront of
you.
Cassini only allows local connections to the web app, so you’ll need
to port scan locally, find the port, and see if you can use ie to
browse to the app. If you can, you’re in luck, and a simple mod to
your watir scripts will work. If not, you need to bug your developers
to help you.

I’ve never seen, or heard of, a successful attempt to automate an
embedded ie object with watir.

Good luck.
–Kyle

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?

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

Sean N. 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 G.
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-----

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?

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

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

On Tue, Apr 8, 2008 at 8:01 PM, Phillip G.

On Apr 10, 11:46 am, Kyle S. [email protected] wrote:

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

On Apr 10, 11:46 am, Kyle S. [email protected] wrote:

http server for all intensive purposes

intents and purposes

On Apr 10, 4:27 pm, Bret P. [email protected] wrote:

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs