Floppy Posted June 1, 2019 Share Posted June 1, 2019 Hello! #include <IE.au3> $oIE = _IECreate() _IENavigate($oIE, 'https://www.deepl.com/it/translator#es/en/'&'hola a todos', 1) Sleep(5000) $oInputs = _IETagNameGetCollection($oIE, 'textarea') $sTxt = "" For $oInput In $oInputs $sTxt &= $oInput.innertext & @CRLF&@CRLF Next MsgBox($MB_SYSTEMMODAL, "Form Input Type", "Form: " & $oInput.form.name & @CRLF & @CRLF & " Types :" & @CRLF & $sTxt) Using the above code I'm able to get all the textarea objects in the page. Now, how can I get and pass to MsgBox only the second one? Is there a way to do it using something like $oInputs[1] ? Link to comment Share on other sites More sharing options...
Danp2 Posted June 1, 2019 Share Posted June 1, 2019 Use the optional $iIndex parameter to retrieve a specific element. $oInput = _IETagNameGetCollection($oIE, 'textarea', 1) Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Floppy Posted June 2, 2019 Author Share Posted June 2, 2019 Thank you! 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