diikee Posted April 16, 2008 Share Posted April 16, 2008 I am automating a web button with no text but the id=down_button in source code below. How do I get this done?? <TR><TD id="zoomin_button" align="left"><A onmouseup="return stopPanDown();" class="down" onmousedown="return startPanDown();" onmouseover="window.status='move down'; return true;" onclick="return false" onmouseout="window.status=''; stopThreads()" href=" "> </A></TD></TR> $obut = _IEGetObjById ($oIE, "zoomin_button") _IEAction ($obut, "click") _IELoadWait($oIE) in the browser, I don't see any change but the script runs and compiles okay. what am I missing Link to comment Share on other sites More sharing options...
Swift Posted April 16, 2008 Share Posted April 16, 2008 It is apperciated of you to make your topic titles descriptive, and without upper-case letters. As for your problem, try checking out some more useful _IE* functions instead of GetObjById. Link to comment Share on other sites More sharing options...
junkew Posted April 16, 2008 Share Posted April 16, 2008 Do you have an _IEAttach in your script to initialize the $oIE? Below a short example for google #include <IE.au3> $oIE = _IECreate ("www.google.com") $searchQ = _IEGetObjById ($oIE, "q") $oSubmit = _IEGetObjById ($oIE, "btnG") _IEFormElementSetValue($searchq,"Autoit") $oclick = _IEAction ($oSubmit, "click") FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
DaleHohm Posted April 16, 2008 Share Posted April 16, 2008 You're needing less common events than are typically used, so IE.au3 doesn't directly support them. You should still be able to get what you wnt however with direct DOM interaction: $obut = _IEGetObjById ($oIE, "zoomin_button") $obut.fireEvent("onmouseover") $obut.fireEvent("onmousedown") $obut.fireEvent("onmouseoout") Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
diikee Posted April 16, 2008 Author Share Posted April 16, 2008 below is my script, advice what I need to add.... #include <IE.au3> $ip = InputBox("Get Ip Address", "Enter IP Address: ") $oIE = _IECreate($ip, 0) _IENavigate($oIE, $ip) _IELoadWait($oIE) _IELinkClickByText($oIE, "p1") _IELoadWait($oIE) _IELinkClickByText($oIE, "p2") _IELoadWait($oIE) _IELinkClickByText($oIE, "p3") _IELoadWait($oIE) $obut = _IEGetObjByID($oIE, "zoomin_button") _IEAction($obut, "click") _IELoadWait($oIE) Link to comment Share on other sites More sharing options...
DaleHohm Posted April 16, 2008 Share Posted April 16, 2008 I assume you missed my reply? Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
diikee Posted April 16, 2008 Author Share Posted April 16, 2008 Tried the $obut.fireEvent("onmousedown") and no events noticed on the browser it's supposed to zoom in on an object but nothing happens Link to comment Share on other sites More sharing options...
DaleHohm Posted April 16, 2008 Share Posted April 16, 2008 It may be happening too fast. $obut = _IEGetObjById ($oIE, "zoomin_button") $obut.fireEvent("onmouseover") Sleep(1000) $obut.fireEvent("onmousedown") Sleep(5000) $obut.fireEvent("onmouseup") Sleep(1000) $obut.fireEvent("onmouseoout") Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
diikee Posted April 16, 2008 Author Share Posted April 16, 2008 <BODY><FORM name="myform" action=""><TABLE class="main" cellSpacing="0" cellPadding="0" width="820"><TBODY><TR><TD vAlign="top" align="left" colSpan="2"><TABLE class="content" id="controls" cellSpacing="0" cellPadding="0"><TBODY><TR vAlign="top"><TD><TABLE class="menu" style="MARGIN-TOP: 11px"><TBODY><TR><TD id="save_button" style="PADDING-BOTTOM: 2px"><UL id="buttonh"><LI class="menu"> <A class="menu" onmouseover='window.status="save image to a file"; return true;' style="PADDING-RIGHT: 10px; PADDING-LEFT: 5px" onclick="return saveAs();" onmouseout='window.status="";' href="">SNAPSHOT</A> here is another one--supposed to invoke the windows "save as" prompt but nothing$osv = _IEGetObjById($oIE, "save_button")$osv.fireEvent("onclick")Sleep(2000) Link to comment Share on other sites More sharing options...
DaleHohm Posted April 17, 2008 Share Posted April 17, 2008 In theory, these techniques should work. Without access to the site, the script behind the events and the ability to test however there is little more I can do. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
diikee Posted April 17, 2008 Author Share Posted April 17, 2008 Is it possible to getObjByClass(menu)??? I believe this is what invokes the javascript to initiate the onclick/onmouseover/onmouseout thanks, Dickson Link to comment Share on other sites More sharing options...
DaleHohm Posted April 17, 2008 Share Posted April 17, 2008 Is it possible to getObjByClass(menu)???I believe this is what invokes the javascript to initiate the onclick/onmouseover/onmouseoutthanks,DicksonThe class= relates to an object property of .classNameDale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
diikee Posted April 18, 2008 Author Share Posted April 18, 2008 Dale, have you ever encountered such a scenario where I you can't access or control objects within a page or is it just something that I am missing?? do you have something that invokes windows "save as prompt"?? Maybe it will lead me to something Link to comment Share on other sites More sharing options...
DaleHohm Posted April 18, 2008 Share Posted April 18, 2008 The examples I gave do access the elements, but the kind of access required and the behavior of the page depends on the script behind the events. To go further you must either get it by guessing and trial and error or you must tear into the script and understand what it is doing. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now