![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | click in a IE child window Hello, When I do a Ricerca.click I get a child window with the results of the search. Is there a way to click to an item in the child window? Thank you. Set oIE = WScript.CreateObject("InternetExplorer.Application") oIE.navigate("about:blank") oIE.visible = 1 RicercaDocumenti="http://cor/azione.asp" oIE.navigate(RicercaDocumenti) Do until oIE.readystate = 4 : wscript.sleep 10: Loop oie.Document.Forms(0).item("nr_prot").Value = "1368223" Set Ricerca=oIE.document.body.getElementsByTagName("INPUT").Item(10) Ricerca.click Do While(oIE.Busy): WScript.Sleep 100 :Loop Set ImmagineDettaglio=oIE.document.body.getElementsByTagName("A").Item(0) ImmagineDettaglio.click -- Giovanni Cenati (Bergamo, Italy) Write to "Reventlov" at katamail com http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) -- |
My System Specs![]() |
| | #2 (permalink) |
| | Re: click in a IE child window hi Reventlov, I can't understand why the multitude of experts here has not answered your inquiry as yet. afaict, you code looks o.k. to me. The only thing I can think of is that the (child) page element you are clicking on may not have appropriate click event handlers ("onClick = ") which may explain why nothing happens (if your question was why doesn't anything happen?)... cheers, jw ____________________________________________________________ You got questions? WE GOT ANSWERS!!! ..(but, no guarantee the answers will be applicable to the questions) Reventlov wrote: Quote: > Hello, > When I do a Ricerca.click I get a child window with the results of the search. Is there a > way to click to an item in the child window? > Thank you. > > Set oIE = WScript.CreateObject("InternetExplorer.Application") > oIE.navigate("about:blank") > oIE.visible = 1 > RicercaDocumenti="http://cor/azione.asp" > > oIE.navigate(RicercaDocumenti) > Do until oIE.readystate = 4 : wscript.sleep 10: Loop > > oie.Document.Forms(0).item("nr_prot").Value = "1368223" > > Set Ricerca=oIE.document.body.getElementsByTagName("INPUT").Item(10) > Ricerca.click > > Do While(oIE.Busy): WScript.Sleep 100 :Loop > Set ImmagineDettaglio=oIE.document.body.getElementsByTagName("A").Item(0) > ImmagineDettaglio.click > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: click in a IE child window Il giorno Mon, 05 Jan 2009 14:28:22 -0500, mr_unreliable <kindlyReplyToNewsgroup@xxxxxx> ha scritto: Quote: >I can't understand why the multitude of experts here >has not answered your inquiry as yet. > >afaict, you code looks o.k. to me. > >The only thing I can think of is that the (child) page >element you are clicking on may not have appropriate >click event handlers ("onClick = ") which may explain >why nothing happens (if your question was why doesn't >anything happen?)... Quote: >> Ricerca.click >> Do While(oIE.Busy): WScript.Sleep 100 :Loop Quote: Quote: >> Set ImmagineDettaglio=oIE.document.body.getElementsByTagName("A").Item(0) >> ImmagineDettaglio.click After Ricerca.click I have the result in a child window after a few seconds. My code waits until the main window (in which I click on the research/ricerca button) is ready and tries to click the image ImmagineDettaglio which should show the details of the document. The fact is that the main window is immediately ready and when I set a reference to ImmagineDettaglio there is no such <a> tag in the window. Because I'm looking for it in the same window of the search button. 1) I should wait until the CHILD window is ready (not the main window). 2)And I should click on the <a> tag "immagineDettaglio" on the child window. My code fails while attempting to find the first <a> tag in the window when I would have to reference to it in the child window. By the way, how could I run a function in the html page? It is a web-based document managment program which normally has 2 frames (a toolbar and a working area). I'm trying to access the working area because it starts in a quite complex way and I was not able to navigate from the 2-frames page. My purpose is to automagically close old documents while I'm at lunch. And keep in evidence only those who require a follow-up. -- Giovanni Cenati (Bergamo, Italy) Write to "Reventlov" at katamail com http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) -- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| getting handle of child window with input focus | Vista General | |||
| window explorer right click menu | General Discussion | |||
| Right click won't close the window... | Vista performance & maintenance | |||