ikku Posted October 28, 2014 Share Posted October 28, 2014 Hello, I've looking for all the forum and i didn't found the answer. I'm creating and application and need to read the text of the html of one web and click in one input radio. This web has a lot of input and a want check what contain the text passed by parameter. By example: <div class="input_tex">one text <input button> </div> <div class="input_tex">one text <input button> </div> <div class="input_tex">MY TEXT!!!! <input button> </div> <div class="input_tex">one text <input button> </div> I want to check the input that is contained in the div with my text. Any idea? Thanks!!! Link to comment Share on other sites More sharing options...
JohnOne Posted October 28, 2014 Share Posted October 28, 2014 _IETagnameGetCollection Loop If Then EndIf obj.innertext AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
jdelaney Posted October 28, 2014 Share Posted October 28, 2014 (edited) You can use my sig...your xpath would be: $xpath = "//div[.='MY TEXT!!!!']/input" ; or $xpath = "//div[contains(.,'MY TEXT!!!!')]/input" You can also validate the attribute, if required: $xpath = "//div[@class='input_tex' And .='MY TEXT!!!!']/input" Edited October 28, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 28, 2014 Share Posted October 28, 2014 What website? Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
ikku Posted October 29, 2014 Author Share Posted October 29, 2014 _IETagnameGetCollection Loop If Then EndIf obj.innertext Thanks!! With this I can detect the div that contains the text. How to check the input button? Link to comment Share on other sites More sharing options...
jdelaney Posted October 29, 2014 Share Posted October 29, 2014 (edited) When you find your object, loop through it's children (.childNodes) until you find the <input>...get that object, and click it with _ieaction (shameless plug: my first example, and signature, does all this, and returns the object...then you just need to call the _ieaction.) Regardless, google IE DOM proprties and methods, and find all the different things you can do. Edited October 29, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
mikell Posted October 29, 2014 Share Posted October 29, 2014 ? Local $odivs = _IETagNameGetCollection($oIE, "div") For $odiv In $odivs If $odiv.... Then ; your div $oinput = _IETagNameGetCollection($odiv, "input", 0) ; your button (input index 0 in $odiv) ; ... EndIf Next 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