LuI Posted May 27, 2008 Share Posted May 27, 2008 Hi,I am trying to automate login at a local website and to navigate a javascript-driven menu in order to get some detailled overview of a system state. My script does work on _my_ machine, but fails on most of the operator ones. I can successfully login, but finally had to record mouseclicks onto given coordinates to operate that javascript-menu. Ant that seems to be the problem - the coordinates differ depending on the actual configuration of the IE. I tried to get the upper left corners coords using _IEPropertyGet(), but always get $_IEStatus_InvalidObjectType.I managed to modify some values for seterror in $_IEStatus_InvalidObjectType in IE.au3 and found that this error is set at If __IEIsObjType($o_object, "window") Or __IEIsObjType($o_object, "document") Thenbecause $o_object is a "document". The function Reference _IEPropertyGet says it 'Returns a select property of the Browser or DOM element.'. I imagined the document being such a DOM element!??I also tried some child elements like frameset, frames and so on and always get the very same error $_IEStatus_InvalidObjectType. Here's part of my code:$o_IE = _IECreate ()_IENavigate ($o_IE, "http://getemed1:8080/visualtime/index.jsp")_IELoadWait($o_IE); get the frame_object, form and controls$o_Doc =_IEDocGetObj($o_IE)$o_Mainframe =_IEFrameGetObjByName($o_IE, "mainframe");MsgBox(0, "Document_obj:", ObjName($o_Doc)) ; work as expected;MsgBox(0, "Document Created Date", $o_Doc.fileCreatedDate) ; dito$IE_DocTop = _IEPropertyGet($o_Doc, "screeny")Can someone help me out?If Dale Home could explain why this If __IEIsObjType($o_object, "window") Or __IEIsObjType($o_object, "document") Then... test is done? Link to comment Share on other sites More sharing options...
DaleHohm Posted May 27, 2008 Share Posted May 27, 2008 Windows, Frames, Documents... none of them have a screeny property. See the object documentation on MSDN. Suggest you get a reference to the document "BODY" element which will have it (it is a DOM element... contained in a document). If you can dig into the document structure (with DebugBar for example), you would likely be able to do this without using screen coordinates. 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...
DaleHohm Posted May 27, 2008 Share Posted May 27, 2008 Windows, Frames, Documents... none of them have a screeny property. See the object documentation on MSDN. Suggest you get a reference to the document "BODY" element which will have it (it is a DOM element... contained in a document). If you can dig into the document structure (with DebugBar for example), you would likely be able to do this without using screen coordinates. 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