nbala75 Posted February 11, 2011 Share Posted February 11, 2011 Quickeee plz What are the different ways to click a button appearing on a IE webpage, when there is no name associated with it. I can see only its "value", by using Debugbar plz help me asap Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 11, 2011 Share Posted February 11, 2011 If an element has no name or id, then you can either get a collection of all matching elements (all INPUT tags, for example), and then loop through the collection looking for an attribute you have, like value or innnerText. Another technique I have used is to get it relative to another element the does have an id or name. You can find parent, child, nextSibling, etc. to get the one you want. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
nbala75 Posted February 12, 2011 Author Share Posted February 12, 2011 (edited) Psalty DSThanx for ur reply...This is what iam referring to....Which function to use here, bcos, _IEFormElementGetObjByName cud not fetch me anything ?? Edited February 12, 2011 by nbala75 Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 12, 2011 Share Posted February 12, 2011 Get the collection of all INPUT tags with _IETagNameGetCollection(), then loop through the collection to find the one with .value = "Cancel". There is a demo script in the help file. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
nbala75 Posted February 14, 2011 Author Share Posted February 14, 2011 Thanx for ur help and will try that functionBtw i have another issueThis sounds weird for me....still better to ask experts. I have been trying to sort this from yday evening but nothing moves on...and i dont want to open a new thread for this...hope u read this and help me outLook at this simple code and tell me why this is not working out...MsgBox(0,$tprice&" "&$osl+0.05) ;Msgbox 1If $tprice=$osl+0.05 then MsgBox(0,"","iam inside loop") ;Msgbox 2EndifMsgbox 1 pops out msg giving out both the values as given below:--I can see both the values are same and still it is not going inside the If condition loop and the Msgbox 2 never fires....i really dont know what iam missing here.... looks weird for me Link to comment Share on other sites More sharing options...
Rogue5099 Posted February 14, 2011 Share Posted February 14, 2011 (edited) MsgBox(0,$tprice&" "&$osl+0.05) ;Msgbox 1If $tprice=$osl+0.05 then MsgBox(0,"","iam inside loop") ;Msgbox 2Endif$tprice = 50.1$osl = 50.05MsgBox(0,"Title", $tprice & " " & $osl + 0.05) ;Msgbox 1If StringCompare($tprice, $osl+0.05) = 0 thenMsgBox(0,"Title","iam inside loop") ;Msgbox 2Endif Edited February 14, 2011 by rogue5099 My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
nbala75 Posted February 20, 2011 Author Share Posted February 20, 2011 Get the collection of all INPUT tags with _IETagNameGetCollection(), then loop through the collection to find the one with .value = "Cancel". There is a demo script in the help file.Yup...thanx a lot and i cud get it done 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