PC Review


Reply
Thread Tools Rate Thread

Detecting Change in State of Internet Explorer

 
 
=?Utf-8?B?QXNo?=
Guest
Posts: n/a
 
      3rd Oct 2006
I'm writing a macro to copy data to and from a web page using mainly the send
keys function. Currently I have set a long wait period in the code while the
site updates. This not only makes the macro run slower than it needs to but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect a
change. Eg when the site move from account search to account information.
 
Reply With Quote
 
 
 
 
NickHK
Guest
Posts: n/a
 
      3rd Oct 2006
Why automate IE ?
Here's 1 example :
http://support.microsoft.com/kb/167658

NickHK

"Ash" <(E-Mail Removed)> 级糶秎ン穝籇:6C57A21B-AF89-497F-8964-(E-Mail Removed)...
> I'm writing a macro to copy data to and from a web page using mainly the
> send
> keys function. Currently I have set a long wait period in the code while
> the
> site updates. This not only makes the macro run slower than it needs to
> but
> also cannot detect if the site crashes.
>
> Does anyone know a way i can check the state of the site and detect a
> change. Eg when the site move from account search to account information.



 
Reply With Quote
 
=?Utf-8?B?QXNo?=
Guest
Posts: n/a
 
      3rd Oct 2006
While automating IE should work I am limited in the way I can access the site
because of company policy. I need to find a way to find out when the site
has loaded the second page.

"NickHK" wrote:

> Why automate IE ?
> Here's 1 example :
> http://support.microsoft.com/kb/167658
>
> NickHK
>
> "Ash" <(E-Mail Removed)> 录露录g漏贸露l楼贸路s禄D:6C57A21B-AF89-497F-8964-(E-Mail Removed)...
> > I'm writing a macro to copy data to and from a web page using mainly the
> > send
> > keys function. Currently I have set a long wait period in the code while
> > the
> > site updates. This not only makes the macro run slower than it needs to
> > but
> > also cannot detect if the site crashes.
> >
> > Does anyone know a way i can check the state of the site and detect a
> > change. Eg when the site move from account search to account information.

>
>
>

 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      3rd Oct 2006
Does that mean you cannot automate IE ?

Or you can talk directly to the server.

NickHK

"Ash" <(E-Mail Removed)> 级糶秎ン穝籇:947ABC93-2261-492F-AAEB-(E-Mail Removed)...
> While automating IE should work I am limited in the way I can access the
> site
> because of company policy. I need to find a way to find out when the site
> has loaded the second page.
>
> "NickHK" wrote:
>
>> Why automate IE ?
>> Here's 1 example :
>> http://support.microsoft.com/kb/167658
>>
>> NickHK
>>
>> "Ash" <(E-Mail Removed)> ???gco?los?D:6C57A21B-AF89-497F-8964-(E-Mail Removed)...
>>
>> > I'm writing a macro to copy data to and from a web page using mainly
>> > the
>> > send
>> > keys function. Currently I have set a long wait period in the code
>> > while
>> > the
>> > site updates. This not only makes the macro run slower than it needs
>> > to
>> > but
>> > also cannot detect if the site crashes.
>> >
>> > Does anyone know a way i can check the state of the site and detect a
>> > change. Eg when the site move from account search to account
>> > information.

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?QXNo?=
Guest
Posts: n/a
 
      3rd Oct 2006
I can do very little. I am restricted to beed able to use send keys to
select a textbox on the site and goto the enter button. after that It using
send keys again to select information.

"NickHK" wrote:

> Does that mean you cannot automate IE ?
>
> Or you can talk directly to the server.
>
> NickHK
>
> "Ash" <(E-Mail Removed)> 录露录g漏贸露l楼贸路s禄D:947ABC93-2261-492F-AAEB-(E-Mail Removed)...
> > While automating IE should work I am limited in the way I can access the
> > site
> > because of company policy. I need to find a way to find out when the site
> > has loaded the second page.
> >
> > "NickHK" wrote:
> >
> >> Why automate IE ?
> >> Here's 1 example :
> >> http://support.microsoft.com/kb/167658
> >>
> >> NickHK
> >>
> >> "Ash" <(E-Mail Removed)> ???gco?l垄Do隆Ps?D:6C57A21B-AF89-497F-8964-(E-Mail Removed)...
> >>
> >> > I'm writing a macro to copy data to and from a web page using mainly
> >> > the
> >> > send
> >> > keys function. Currently I have set a long wait period in the code
> >> > while
> >> > the
> >> > site updates. This not only makes the macro run slower than it needs
> >> > to
> >> > but
> >> > also cannot detect if the site crashes.
> >> >
> >> > Does anyone know a way i can check the state of the site and detect a
> >> > change. Eg when the site move from account search to account
> >> > information.
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      3rd Oct 2006
If you can ONLY use SendKeys as a requirements, then it seems you in for
alot of trouble every time there is a small layout change in the controls on
the pages etc.
Good luck.

And I suppose an Excel web query is out of the question ?

NickHK

"Ash" <(E-Mail Removed)> 级糶秎ン穝籇:7C718914-0B07-4692-9047-(E-Mail Removed)...
>I can do very little. I am restricted to beed able to use send keys to
> select a textbox on the site and goto the enter button. after that It
> using
> send keys again to select information.
>
> "NickHK" wrote:
>
>> Does that mean you cannot automate IE ?
>>
>> Or you can talk directly to the server.
>>
>> NickHK
>>
>> "Ash" <(E-Mail Removed)> ???gco?los?D:947ABC93-2261-492F-AAEB-(E-Mail Removed)...
>>
>> > While automating IE should work I am limited in the way I can access
>> > the
>> > site
>> > because of company policy. I need to find a way to find out when the
>> > site
>> > has loaded the second page.
>> >
>> > "NickHK" wrote:
>> >
>> >> Why automate IE ?
>> >> Here's 1 example :
>> >> http://support.microsoft.com/kb/167658
>> >>
>> >> NickHK
>> >>
>> >> "Ash" <(E-Mail Removed)> ???gco?lDo!Ps?D:6C57A21B-AF89-497F-8964-(E-Mail Removed)...
>> >>
>> >> > I'm writing a macro to copy data to and from a web page using mainly
>> >> > the
>> >> > send
>> >> > keys function. Currently I have set a long wait period in the code
>> >> > while
>> >> > the
>> >> > site updates. This not only makes the macro run slower than it
>> >> > needs
>> >> > to
>> >> > but
>> >> > also cannot detect if the site crashes.
>> >> >
>> >> > Does anyone know a way i can check the state of the site and detect
>> >> > a
>> >> > change. Eg when the site move from account search to account
>> >> > information.
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?QXNo?=
Guest
Posts: n/a
 
      3rd Oct 2006
It's been interesting. I've got everytthing working perfect apart from when
the web based system is running sluggish and the wait time I have for a web
page isn't long enough.

"NickHK" wrote:

> If you can ONLY use SendKeys as a requirements, then it seems you in for
> alot of trouble every time there is a small layout change in the controls on
> the pages etc.
> Good luck.
>
> And I suppose an Excel web query is out of the question ?
>
> NickHK
>
> "Ash" <(E-Mail Removed)> 录露录g漏贸露l楼贸路s禄D:7C718914-0B07-4692-9047-(E-Mail Removed)...
> >I can do very little. I am restricted to beed able to use send keys to
> > select a textbox on the site and goto the enter button. after that It
> > using
> > send keys again to select information.
> >
> > "NickHK" wrote:
> >
> >> Does that mean you cannot automate IE ?
> >>
> >> Or you can talk directly to the server.
> >>
> >> NickHK
> >>
> >> "Ash" <(E-Mail Removed)> ???gco?l垄Do隆Ps?D:947ABC93-2261-492F-AAEB-(E-Mail Removed)...
> >>
> >> > While automating IE should work I am limited in the way I can access
> >> > the
> >> > site
> >> > because of company policy. I need to find a way to find out when the
> >> > site
> >> > has loaded the second page.
> >> >
> >> > "NickHK" wrote:
> >> >
> >> >> Why automate IE ?
> >> >> Here's 1 example :
> >> >> http://support.microsoft.com/kb/167658
> >> >>
> >> >> NickHK
> >> >>
> >> >> "Ash" <(E-Mail Removed)> ???gco?l垄FDo!Ps?D:6C57A21B-AF89-497F-8964-(E-Mail Removed)...
> >> >>
> >> >> > I'm writing a macro to copy data to and from a web page using mainly
> >> >> > the
> >> >> > send
> >> >> > keys function. Currently I have set a long wait period in the code
> >> >> > while
> >> >> > the
> >> >> > site updates. This not only makes the macro run slower than it
> >> >> > needs
> >> >> > to
> >> >> > but
> >> >> > also cannot detect if the site crashes.
> >> >> >
> >> >> > Does anyone know a way i can check the state of the site and detect
> >> >> > a
> >> >> > change. Eg when the site move from account search to account
> >> >> > information.
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
ron
Guest
Posts: n/a
 
      3rd Oct 2006
Ash wrote:
> I'm writing a macro to copy data to and from a web page using mainly the send
> keys function. Currently I have set a long wait period in the code while the
> site updates. This not only makes the macro run slower than it needs to but
> also cannot detect if the site crashes.
>
> Does anyone know a way i can check the state of the site and detect a
> change. Eg when the site move from account search to account information.


It sounds like you are using SENDKEY (ugh!) to enter info on a web
page, click enter or some similar button and then a new web page
appears. If you are trying to detect when this new page is fully
loaded, insert something like the following loop in your code...Ron

Do Until .ReadyState = READYSTATE_COMPLETE And Not .Busy
DoEvents
Loop

 
Reply With Quote
 
Nigel
Guest
Posts: n/a
 
      3rd Oct 2006
Not sure if this helps but I use this to wait for a response, I have in the
past also used the OnTime function to time this out if needed.

Sub WebLink()
Set ie = CreateObject("InternetExplorer.Application")

sURL = "http://www.yourpage.com"

ie.Navigate sURL

'wait for response
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

ie.Visible = True

ie.Quit
Set ie = Nothing

End Sub


--
Cheers
Nigel



"Ash" <(E-Mail Removed)> wrote in message
news:6C57A21B-AF89-497F-8964-(E-Mail Removed)...
> I'm writing a macro to copy data to and from a web page using mainly the
> send
> keys function. Currently I have set a long wait period in the code while
> the
> site updates. This not only makes the macro run slower than it needs to
> but
> also cannot detect if the site crashes.
>
> Does anyone know a way i can check the state of the site and detect a
> change. Eg when the site move from account search to account information.



 
Reply With Quote
 
alex_f_il@hotmail.com
Guest
Posts: n/a
 
      9th Oct 2006
You can also try SWExplorerAutomation SWEA (http://webunittesting.com).
SWEA makes IE automation a very simple task.

Ash wrote:
> I'm writing a macro to copy data to and from a web page using mainly the send
> keys function. Currently I have set a long wait period in the code while the
> site updates. This not only makes the macro run slower than it needs to but
> also cannot detect if the site crashes.
>
> Does anyone know a way i can check the state of the site and detect a
> change. Eg when the site move from account search to account information.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detecting if Internet Explorer browser is installed =?Utf-8?B?b3JpdA==?= Microsoft Dot NET Framework Forms 0 31st Jul 2007 04:02 PM
Detecting Change in State of Internet Explorer =?Utf-8?B?QXNo?= Microsoft Access VBA Modules 1 3rd Oct 2006 02:11 PM
Keeps detecting an automatic feed download from Internet Explorer =?Utf-8?B?UnlzdGVy?= Spyware Discussion 3 7th Mar 2006 08:49 PM
Detecting File State Roger Microsoft VB .NET 7 24th Mar 2005 07:27 PM
how to restore Internet Explorer state? Adam Dingle Windows XP Internet Explorer 0 28th Jun 2004 07:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:42 AM.