Krmat Posted September 14, 2014 Share Posted September 14, 2014 Hi All!I'm struggling with this page I want to automate. The formelements, like buttons, textarea's and radio buttons are being called by Javascript.. Through searching for Tags on the whole page, I found most elements I was looking for, a lot of wich I can manipulate with for example using _IEFormElementGet & SetValue, or _IEAction.But i came across with these radio buttons I need to automate (just need to get the state of them, if its selected or not). There is no FORM on this page, so i can't use _IEFormElementRadioSelect($oForm, 0, "radioExample", -1, "byIndex") to get the state of them, i can manipulate them using _IETagNameGetCollection and _IEAction. How do I check the state these radiobuttons? If I have to use _IEFormElementRadioSelect, how do I find the correct "$oForm" without one? I have already check the examples to make sure that there is no FORMs. Local $oIE = _IEAttach ("") Local $oFrames = _IEFrameGetCollection($oIE, 0) ; Select first frame Local $oObj = _IEGetObjById($oFrames, "__RECORD_LINK_1__") Local $radiobutton1 = _IETagNameGetCollection($oObj, "input", 1) _IEAction($radiobutton1, "click") ; I can select the radio button if i want to, but i need to check the state because some of them come already selected. Thanks in advance! Link to comment Share on other sites More sharing options...
Solution Danp2 Posted September 14, 2014 Solution Share Posted September 14, 2014 Maybe reviewing >this thread will help. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Krmat Posted September 14, 2014 Author Share Posted September 14, 2014 Thx Danp2. Solved my problem. Just put the ".checked" and it will return "True" or "False" state (exactly what i want) Local $oIE = _IEAttach ("") Local $oFrames = _IEFrameGetCollection($oIE, 0) ; Select first frame Local $oObj = _IEGetObjById($oFrames, "__RECORD_LINK_1__") Local $radiobutton1 = _IETagNameGetCollection($oObj, "input", 1) MsgBox($MB_SYSTEMMODAL, "Element Check State", $radiobutton1.checked) ;Working thx to Danp2 XD 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