|
List Info
Thread: How can I automate a task like open browser and click a button?
|
|
| How can I automate a task like open
browser and click a button? |

|
2006-12-24 21:54:41 |
Hi,
How can I automate a task like open a new browser add a text
to a textBox and click a button from a webForm?
From winForm it dose like this:
HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument) axWebBrowser1.Document;
HTMLInputElement otxtSearchBox =
(HTMLInputElement) myDoc.all.item("q", 0);
otxtSearchBox.value = "intel corp";
HTMLInputElement btnSearch = (HTMLInputElement)
myDoc.all.item("btnI", 0);
btnSearch.click();
Thanks,
Lior.
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
|
| How can I automate a task like open
browser and click a button? |

|
2006-12-24 22:08:40 |
First, please don't cross post your questions to multiple
mailing lists
until you fail to get an answer on one.
TO launch a new browser window is easy, just launch
iexplorer.exe (or your
favorite browser) with the desitanation as a commandline
parameter. But
setting a value and clicking it could be much harder. What
are you trying
to accomplish?
Thanks,
Shawn Wildermuth
Wildermuth Consulting Services, LLC
http://adoguy.com
C# MVP, MCSD.NET, Author and Speaker
-----Original Message-----
From: Discussion of building .NET applications targeted for
the Web
[mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of Lior Levy
Sent: Sunday, December 24, 2006 4:55 PM
To: DOTNET-WEB DISCUSS.DEVELOP.COM
Subject: [DOTNET-WEB] How can I automate a task like open
browser and click
a button?
Hi,
How can I automate a task like open a new browser add a text
to a textBox
and click a button from a webForm?
From winForm it dose like this:
HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument) axWebBrowser1.Document;
HTMLInputElement otxtSearchBox =
(HTMLInputElement)
myDoc.all.item("q", 0);
otxtSearchBox.value = "intel corp";
HTMLInputElement btnSearch = (HTMLInputElement)
myDoc.all.item("btnI", 0);
btnSearch.click();
Thanks,
Lior.
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
|
| How can I automate a task like open
browser and click a button? |

|
2006-12-25 08:34:07 |
Hi,
I am trying to automate a task that someone is doing like go
to search engine type a string clicks the search button save
the results in a loop.
It must be done from a web form.
What are these commands? Can they help me?
aximp c:windowssystemshdocvw.dll
tlbimp mshtml.tlb
Thanks,
Lior.
-----Original Message-----
From: Discussion of building .NET applications targeted for
the Web [mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of Shawn Wildermuth
Sent: Monday, December 25, 2006 12:09 AM
To: DOTNET-WEB DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] How can I automate a task like
open browser and click a button?
First, please don't cross post your questions to multiple
mailing lists
until you fail to get an answer on one.
TO launch a new browser window is easy, just launch
iexplorer.exe (or your
favorite browser) with the desitanation as a commandline
parameter. But
setting a value and clicking it could be much harder. What
are you trying
to accomplish?
Thanks,
Shawn Wildermuth
Wildermuth Consulting Services, LLC
http://adoguy.com
C# MVP, MCSD.NET, Author and Speaker
-----Original Message-----
From: Discussion of building .NET applications targeted for
the Web
[mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of Lior Levy
Sent: Sunday, December 24, 2006 4:55 PM
To: DOTNET-WEB DISCUSS.DEVELOP.COM
Subject: [DOTNET-WEB] How can I automate a task like open
browser and click
a button?
Hi,
How can I automate a task like open a new browser add a text
to a textBox
and click a button from a webForm?
From winForm it dose like this:
HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument) axWebBrowser1.Document;
HTMLInputElement otxtSearchBox =
(HTMLInputElement)
myDoc.all.item("q", 0);
otxtSearchBox.value = "intel corp";
HTMLInputElement btnSearch = (HTMLInputElement)
myDoc.all.item("btnI", 0);
btnSearch.click();
Thanks,
Lior.
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
|
| How can I automate a task like open
browser and click a button? |

|
2006-12-26 00:44:21 |
Lior,
I think that what you're trying to do can be accomplished
with frames, but
it's not very elegant. Did you try posting the search
request to the search
site yourself or using a querystring with the search request
as a link with
a target for a new window? With this type of solution you
can try using a
regular newsgroup since it's not .NET specific. It can
probably be done
with straight html and javascript.
Another thing you could try is scraping (HttpWebRequest) the
target site
server side and returning the results to the client -
parsing that
information will have maintenance issues, though.
-- Brian
On 12/25/06, Lior Levy <liorlevi exchange.bgu.ac.il>
wrote:
>
> Hi,
> I am trying to automate a task that someone is doing
like go to search
> engine type a string clicks the search button save the
results in a loop.
> It must be done from a web form.
>
> What are these commands? Can they help me?
> aximp c:windowssystemshdocvw.dll
> tlbimp mshtml.tlb
>
> Thanks,
> Lior.
>
>
>
> -----Original Message-----
> From: Discussion of building .NET applications targeted
for the Web
> [mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of Shawn Wildermuth
> Sent: Monday, December 25, 2006 12:09 AM
> To: DOTNET-WEB DISCUSS.DEVELOP.COM
> Subject: Re: [DOTNET-WEB] How can I automate a task
like open browser and
> click a button?
>
> First, please don't cross post your questions to
multiple mailing lists
> until you fail to get an answer on one.
>
> TO launch a new browser window is easy, just launch
iexplorer.exe (or your
> favorite browser) with the desitanation as a
commandline parameter. But
> setting a value and clicking it could be much harder.
What are you trying
> to accomplish?
>
>
> Thanks,
>
> Shawn Wildermuth
> Wildermuth Consulting Services, LLC
> http://adoguy.com
> C# MVP, MCSD.NET, Author and Speaker
>
> -----Original Message-----
> From: Discussion of building .NET applications targeted
for the Web
> [mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of Lior Levy
> Sent: Sunday, December 24, 2006 4:55 PM
> To: DOTNET-WEB DISCUSS.DEVELOP.COM
> Subject: [DOTNET-WEB] How can I automate a task like
open browser and
> click
> a button?
>
>
>
>
>
> Hi,
>
>
>
> How can I automate a task like open a new browser add a
text to a textBox
> and click a button from a webForm?
>
>
>
> From winForm it dose like this:
>
>
>
> HTMLDocument myDoc = new
HTMLDocumentClass();
>
> myDoc = (HTMLDocument)
axWebBrowser1.Document;
>
>
>
> HTMLInputElement otxtSearchBox =
(HTMLInputElement)
> myDoc.all.item("q", 0);
>
> otxtSearchBox.value = "intel
corp";
>
>
>
> HTMLInputElement btnSearch =
(HTMLInputElement)
> myDoc.all.item("btnI", 0);
>
> btnSearch.click();
>
>
>
> Thanks,
>
> Lior.
>
>
>
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
|
| How can I automate a task like open
browser and click a button? |

|
2006-12-26 03:05:38 |
you can do it as described below - but if you want browser
integration for whatever reason...just useDocumentComplete
and access the object model to fill in the search box and
submit the form/button.
ex:
html =
IE.Document.frames[1].Document.documentElement.innerHTML
IE.Document.frames[1].Document.Forms[0].submit
This was using some old vb code - events should be the
same/similiar in 2.0
IE was the browser object I started. There were certain
event issues in .net using the library, but haven't tried
the integration with SP1 though but this should be pretty
simple. I had written a site monitoring app this way,
worked decent.
On Mon, 25 Dec 2006 16:44:21 -0800
brian zinn <discuss WAKESKATE.COM> wrote:
> Lior,
>
> I think that what you're trying to do can be
accomplished
> with frames, but
> it's not very elegant. Did you try posting the search
> request to the search
> site yourself or using a querystring with the search
> request as a link with
> a target for a new window? With this type of solution
> you can try using a
> regular newsgroup since it's not .NET specific. It can
> probably be done
> with straight html and javascript.
>
> Another thing you could try is scraping
(HttpWebRequest)
> the target site
> server side and returning the results to the client -
> parsing that
> information will have maintenance issues, though.
>
> -- Brian
>
> On 12/25/06, Lior Levy <liorlevi exchange.bgu.ac.il>
> wrote:
> >
> > Hi,
> > I am trying to automate a task that someone is
doing
> like go to search
> > engine type a string clicks the search button save
the
> results in a loop.
> > It must be done from a web form.
> >
> > What are these commands? Can they help me?
> > aximp c:windowssystemshdocvw.dll
> > tlbimp mshtml.tlb
> >
> > Thanks,
> > Lior.
> >
> >
> >
> > -----Original Message-----
> > From: Discussion of building .NET applications
targeted
> for the Web
> > [mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of
> Shawn Wildermuth
> > Sent: Monday, December 25, 2006 12:09 AM
> > To: DOTNET-WEB DISCUSS.DEVELOP.COM
> > Subject: Re: [DOTNET-WEB] How can I automate a
task
> like open browser and
> > click a button?
> >
> > First, please don't cross post your questions to
> multiple mailing lists
> > until you fail to get an answer on one.
> >
> > TO launch a new browser window is easy, just
launch
> iexplorer.exe (or your
> > favorite browser) with the desitanation as a
> commandline parameter. But
> > setting a value and clicking it could be much
harder.
> What are you trying
> > to accomplish?
> >
> >
> > Thanks,
> >
> > Shawn Wildermuth
> > Wildermuth Consulting Services, LLC
> > http://adoguy.com
> > C# MVP, MCSD.NET, Author and Speaker
> >
> > -----Original Message-----
> > From: Discussion of building .NET applications
targeted
> for the Web
> > [mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of
> Lior Levy
> > Sent: Sunday, December 24, 2006 4:55 PM
> > To: DOTNET-WEB DISCUSS.DEVELOP.COM
> > Subject: [DOTNET-WEB] How can I automate a task
like
> open browser and
> > click
> > a button?
> >
> >
> >
> >
> >
> > Hi,
> >
> >
> >
> > How can I automate a task like open a new browser
add a
> text to a textBox
> > and click a button from a webForm?
> >
> >
> >
> > From winForm it dose like this:
> >
> >
> >
> > HTMLDocument myDoc = new
> HTMLDocumentClass();
> >
> > myDoc = (HTMLDocument)
> axWebBrowser1.Document;
> >
> >
> >
> > HTMLInputElement otxtSearchBox =
> (HTMLInputElement)
> > myDoc.all.item("q", 0);
> >
> > otxtSearchBox.value = "intel
corp";
> >
> >
> >
> > HTMLInputElement btnSearch =
> (HTMLInputElement)
> > myDoc.all.item("btnI", 0);
> >
> > btnSearch.click();
> >
> >
> >
> > Thanks,
> >
> > Lior.
> >
> >
> >
> >
> > ===================================
> > This list is hosted by DevelopMentor(r)
> http://www.develop.com
> >
> > View archives and manage your subscription(s) at
> > http://discuss.develop.com
> >
> > ===================================
> > This list is hosted by DevelopMentor(r)
> http://www.develop.com
> >
> > View archives and manage your subscription(s) at
> > http://discuss.develop.com
> >
> > ===================================
> > This list is hosted by DevelopMentor(r)
> http://www.develop.com
> >
> > View archives and manage your subscription(s) at
> > http://discuss.develop.com
> >
>
> ===================================
> This list is hosted by DevelopMentorŪ
> http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
------------------------------------------------------------
---------
Web mail provided by NuNet, Inc. The Premier National
provider.
http://www.nni.com/
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
|
[1-5]
|
|