Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting Change in State of Internet Explorer
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting Change in State of Internet Explorer
Why automate IE ?
Here's 1 example : http://support.microsoft.com/kb/167658 NickHK "Ash" ... 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting Change in State of Internet Explorer
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" ... 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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting Change in State of Internet Explorer
Does that mean you cannot automate IE ?
Or you can talk directly to the server. NickHK "Ash" ... 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" ... 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. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting Change in State of Internet Explorer
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" ... 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" ... 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. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting Change in State of Internet Explorer
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" ... 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" ... 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" ... 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. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting Change in State of Internet Explorer
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" ... 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" ... 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" ... 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. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting Change in State of Internet Explorer
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 |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting Change in State of Internet Explorer
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" wrote in message ... 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. |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting Change in State of Internet Explorer
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Internet Explorer | Excel Discussion (Misc queries) | |||
Excel/VBA/Internet Explorer | Excel Programming | |||
internet explorer | Excel Discussion (Misc queries) | |||
detecting the state of filters | Excel Programming | |||
Detecting Calculation State | Excel Programming |