IEFormFill - Set dropdown using HTML value

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Dominic_Fichera
Pro Scripter
Posts: 82
Joined: Mon Mar 24, 2014 12:15 pm

IEFormFill - Set dropdown using HTML value

Post by Dominic_Fichera » Wed Aug 26, 2015 4:52 am

Hey guys,

Another IE question - Is it possible to set the value of a dropdown menu with IEFormFill based off the HTML value of a field? For example, based on the below HTML, could I say:

Code: Select all

IEFormFill>IE[0],,,name,PERSONNAME,,res
where PERSONNAME is FZT70 for Dominic or TBS16 for Paul etc

Code: Select all

		<select name="name">
		<option value="1"> 
		</option>
		
		  <option value="FZT70" >Dominic
		</option>
		
		  <option value="TBS16" >Paul
		</option>
		
		  <option value="LNL30" >Tim
		</option>
		</select>
I've seen in the manual that you can set based off the index, but the list size will always be changing, so a static list position wouldn't work for long.

Thanks in advance,

Dominic Fichera

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: IEFormFill - Set dropdown using HTML value

Post by Marcus Tettmar » Wed Aug 26, 2015 10:27 am

Use IETagEventByAttrib instead and just provide the actual value.

Alternatively, extract the HTML, regex it to find the item you want based on the value and pull out the item text.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Dominic_Fichera
Pro Scripter
Posts: 82
Joined: Mon Mar 24, 2014 12:15 pm

Re: IEFormFill - Set dropdown using HTML value

Post by Dominic_Fichera » Thu Aug 27, 2015 3:01 am

Hey Marcus,

IETagEventByAttrib is the first thing I tried:

Code: Select all

IETagEventByAttrib>{%URL%},SELECT,name=employeeNumber,,FZT70
but I get the following error: "Line: 1 - unable to set tag value".

RegEx sounds perfect, but I've never really understood how it works. I've had a bit of a read through the manual, but none the wiser :( After a quick look at the "Find an IP address" without EasyPatterns, this looks like it might work, but I don't know how to determine the pattern it looks for. Would appreciate any help you might be able to provide.

Thanks,

Dominic Fichera

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts