Rob774 Posted May 19, 2014 Posted May 19, 2014 Hi guys I must say that these forums have been a great help to me as I am starting out in Autoit scripting but I have hit a wall when it comes to my next issue. What my script is doing is reading an Excel spread sheet and putting the data in to a field on a web page. What I have found now is that some fields are session based. So a field would be called "ID=Business_173623744894_Note_84" where the 173623744894 is the session number but the words are the same all the time. The code I use now for fields I know the name of is: Local $Note_Value = _ExcelReadCell($oExcel1, 7, 14) ;Reads the Excel spread sheet for a value Local $note_text = _IEGetObjByName($oIE, "note_text") _IEFormElementSetValue($note_text, $Note_Value) How can I write the code if the note_field is like the one above where is has a session number in it? If someone could help or point me in teh right direction it would be great. Thanks
Danp2 Posted May 19, 2014 Posted May 19, 2014 Perhaps you could determine a way to calculate the proper name and then continue to use _IEGetObjByName. Otherwise, I would look at using _IETagNameGetCollection and then loop through the returned collection until you find the desired element. Latest Webdriver UDF Release Webdriver Wiki FAQs
Rob774 Posted May 19, 2014 Author Posted May 19, 2014 Thanks, I will go looking for some examples of _IETagNameGetCollection and see if I can make it work.
JohnOne Posted May 19, 2014 Posted May 19, 2014 First stop should be the help files example. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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