IE COM object within web service

S

Shone

Hi,
can you please help me figure out what I need to do to make IE COM
object (namely, using IEBrowser =
CreateObject("InternetExplorer.Application")) work within the web
service?
I manage to pass the "cannot create COM object" error, by setting the
IE security properties in "dcomcfg.exe", but it seems that IE can't
perform form submit operation on the containing webpage. More
precisely, the IE object is successfuly created, navigates to the
homepage, I supply the values to the form fields, but when I try to
submit the form, it just hangs there forever or times-out eventually.
No need to mention that all this works fine when run from the windows
form app.

Thanks much...
Shone
 
G

Girish Bharadwaj

Umm. You might want to look into to some objects from .NET natively such
as HttpWebRequest.
Using IE to do what you are doing, seems a bit extreme.
 
S

Shone

oh, no, no, no... can't do it!
You see, I'm developing a "robot" to replace the human in tedious and
repetitive tasks of surfing the website and gathering info. Imagine
the user having to go back and forth, click here and there, supply the
same criteria several times and have all his/her data just shown on
the screen, so it needs to be written down or copy/pasted. It would
take him/her at least half an hour for aeach case. Not so bad? Well,
how about 50-60 such cases he/she needs to do a day? My program will
replace all this by having to supply the criteria only once and click
a button, so the request goes into the queue and being processed in a
batch.
So it's complex enough to program the human thinking and decision
logic, I can't also re-program complex IE functionality. It would be
too much to have to generate GET/POST request, support the cookies,
extract the href from the inner HTML tags and forms... etc., when IE
object already does all that behind the scene. All I need is to
recognize the elements on a given page , supply the data into fields
and programatically "click" the links and clickable tags, "submit" the
forms , go back and forth, etc, and finally read the results. And this
is complex enough believe me.
I would rather use the native .NET classes, but there are no such yet
(somebody said on the forum that those are expected in ver. 2
framework), so I had to use COM (Shdocwv.InternetExplorer).

So what do you think about this strange behavior? To remind you, IE
appears to be working fine under WS, untill I try to submit a form or
click a link that has "submit" role on a form. As long as I just do
navigation to URL, setting the field values or clicking a "simple"
links to other pages - it works OK.
Example:
objIE.Navigate("http:/someURL") - WORKS
objIE.Document.all("ctlName").value="somevalue" - WORKS
objIE.Document.all("tagName").click - WORKS, if a tag is not a
submit type on a form

objIE.Document.all("formName").Submit() - DOESN'T WORK


thanks for your interest,
greetings...
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top