HighlanderSword Posted December 1, 2012 Share Posted December 1, 2012 Hello, I need to assign the choices that are available in A Drop Down to variables in My script. I used the code below to get the choices that are in the drop down, however I dont see any way to determine where one Choice ends and the Next Begins The Choices in the Prompts change so there is no way before the script runs to know what choices ar available to select from Below is the code Im using, How would I parse them to get each individual selection Listed below are the first 3 choices from the drop down. I dont see any special characters to identify where one ends and the next begins eSMART Team Web Users GWIM BAI AML Web Users GWIM Basic Web Role Dim $oTag = _IETagNameGetCollection($oIE, 'select', 1) ConsoleWrite($oTag.InnerText & @crlf) It returns eSMART Team Web UsersGWIM BAI AML Web UsersGWIM Basic Web Link to comment Share on other sites More sharing options...
Danp2 Posted December 1, 2012 Share Posted December 1, 2012 This should get you moving in the right direction: #include <IE.au3> _IEErrorHandlerRegister() $oIE = _IEAttach("Window Title") Local $oTag = _IETagNameGetCollection($oIE, 'Select', 0) Local $oOptions = _IETagNameGetCollection($oTag, "option") For $oOption In $oOptions ConsoleWrite($oOption.value & @crlf) ConsoleWrite($oOption.innerHTML & @crlf) Next Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
HighlanderSword Posted December 1, 2012 Author Share Posted December 1, 2012 Thanks , that is exactly what I needed. 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