scttech1967 Posted September 17, 2017 Posted September 17, 2017 Forgive me for being a total noob on my AutoIT skills, but I'm having a heck of a time retrieving the text from a web page text box. See code & html below. Any help appreciated. ; Code doesn't find & display Local $oIE = _IECreate("http://www.latlong.net") $oDiv = _IEGetObjByName ($oIE, "lat") MsgBox($MB_SYSTEMMODAL, "Form Element Value", $oText) Code from web page <div class="col-6 m2"> <label for="lat">Latitude</label> <input type="text" name="lat" id="lat" placeholder="lat coordinate" /> </div>
Danp2 Posted September 17, 2017 Posted September 17, 2017 You retrieved an input element, but you never retrieve any values ($oText is unassigned). Also I see issues with using _IEGetObjByName instead of _IEGetObjById (this input element doesn't have a name). Try -- Local $oIE = _IECreate("http://www.latlong.net") $oLat = _IEGetObjById($oIE, "lat") MsgBox($MB_SYSTEMMODAL, "Form Element Value", $oLat.value) Latest Webdriver UDF Release Webdriver Wiki FAQs
scttech1967 Posted September 17, 2017 Author Posted September 17, 2017 I can't believe I missed that! Seems that I tried every variation and had the return value in the message box. Thank you @Danp2 !!
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