Letraindusoir Posted March 6, 2020 Share Posted March 6, 2020 (edited) $tFrame = $oIexp.document.getElementsByTagName('iframe').item(0) $oFrame = $oIexp.document.parentwindow.frames.item(0) As shown above, $tFrame and $oFrame, what is the difference between the two Frames objects obtained by the two methods? Because problems are found during use: 1 、$tFrame.attributes() can work 1 、$oFrame.attributes() can not work So some doubts, hope to understand more clearly. Thanks in advance! Edited March 12, 2020 by Letraindusoir Link to comment Share on other sites More sharing options...
Danyfirex Posted March 6, 2020 Share Posted March 6, 2020 Hello, $oIexp.document.getElementsByTagName('iframe').item(0) returns HTMLFrameElement object $oIexp.document.parentwindow.frames.item(0) returns HTMLWindow2 object Saludos Letraindusoir 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Danyfirex Posted March 6, 2020 Share Posted March 6, 2020 Hello, $oIexp.document.getElementsByTagName('iframe').item(0) returns HTMLFrameElement object $oIexp.document.parentwindow.frames.item(0) returns HTMLWindow2 object Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
junkew Posted March 6, 2020 Share Posted March 6, 2020 It are just different objects with different methods https://www.w3schools.com/jsref/met_document_getelementsbytagname.asp The getElementsByTagName() method returns a collection of all elements in the document with the specified tag name, as an HTMLCollection object Letraindusoir 1 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...
Nine Posted March 6, 2020 Share Posted March 6, 2020 To add a bit more precision : $oIexp.document.parentwindow.frames.item (0) is the same thing as $oIexp.document.getElementsByTagName('iframe').item(0).contentWindow Letraindusoir 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Letraindusoir Posted March 7, 2020 Author Share Posted March 7, 2020 (edited) Thank all masters for the help! I seem to understand what's going on..... $tForm =$oIexp.document.getElementsByTagName('form').item(0) $oForm = $oIexp.document.forms.item(0) The above seems to be equivalent object. No errors were found in use. but $tFrame = $oIexp.document.getElementsByTagName('iframe').item(0) $oFrame = $oIexp.document.parentwindow.frames.item(0) those are different types of objects, so there are errors Edited March 7, 2020 by Letraindusoir 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