Laszlo55 Posted April 18, 2013 Posted April 18, 2013 Hi Everybody! I'm new in AutoIt. After some introductory simple tests I tried a "real" problem. Unfortunately, I ran in problems from the first. When I try to scrap some data from the site http://www.burcoinc.com/products/online_catalog/ selecting the control box Year, Make or Model is not working! The code line with problems are the last two::#include<IE.au3>Global $oIE=_IECreate("http://www.burcoinc.com/products/online_catalog/")Local $oForm = _IEGetObjByID($oIE, "ReportViewer1_ctl00_ctl03_ddValue") _IEFormElementOptionselect($oForm, 8, 1, "byIndex")the error lines are:IE.au3 V2.4-0 Warning from function _IEGetObjById, $_IEStatus_NoMatch (ReportViewer1_ctl00_ctl03_ddValue)--> IE.au3 V2.4-0 Error from function _IEFormElementOptionselect, $_IEStatus_InvalidDataTypeThe control name is from the page's source code, (checked both from IE and Chrome). Also tried with AU3Info but in this page it selects only the frame around the controls, not the controls. What is happening?I can't find a solution, could anybody help me? Thank you in advance.Laszlo
Danp2 Posted April 18, 2013 Posted April 18, 2013 Looks like there are frames being used on this site, which is likely what is the first issue you will need to tackle. Latest Webdriver UDF Release Webdriver Wiki FAQs
Laszlo55 Posted April 18, 2013 Author Posted April 18, 2013 Thank you. Meantime I found some similar ideas in some older posts. It seems it is a general problem. I tried to correct my code, but I didn't manage. Could you be more specific?
water Posted April 18, 2013 Posted April 18, 2013 To access form elements by the IE UDF I think you need to use the _IEForm* functions. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
DaleHohm Posted April 19, 2013 Posted April 19, 2013 You can get a reference to a form using _IEGetObjById as the poster is doing.This is a common coding mistake caused by not really understanding what the function calls are doing.IE.au3 V2.4-0 Warning from function _IEGetObjById, _IEStatus_NoMatch (ReportViewer1_ctl00_ctl03_ddValue) There is a lot of detail in there. Read it and understand it.There is NOMATCH for the ID you passed in the document. Prove it to yourself with:ConsoleWrite(_IEDocReadHTML($oIE))And as previously mentioned, you may well see some frames in that source.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
Laszlo55 Posted April 19, 2013 Author Posted April 19, 2013 Thank you guys! It seems I have to learn more, until I could use autoit efficiently. My problem is that in the page's whole source code is only ONE frame name. Of course if I use it, I get the usual NOMATCH error. Any ideas?
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