Blue Moon
Blue Moon

Reputation: 313

iMacros Form Filling for Auto Suggestion Dropdown

I am trying to fill up auto suggestion form on iMacros however despite all the efforts, it is still not working. I tried

Method 1 The idea to work with Events

 VERSION BUILD=9030808 RECORDER=FX
 TAB T=1
 URL GOTO=http://www.etihad.com/en-ae/
 EVENT TYPE=CLICK XPATH="//input[@data-name='FlightBookingForm_Origin']" 
 BUTTON=0
 EVENT TYPE=KEYPRESS XPATH="//input[@data-name='FlightBookingForm_Origin']" 
 CHAR="A"
 EVENT TYPE=CLICK XPATH="//input[@data-name='FlightBookingForm_Origin']" 
 BUTTON=0
 EVENT TYPE=KEYPRESS XPATH="//input[@data-name='FlightBookingForm_Origin']" 
 CHAR="U"
 EVENT TYPE=CLICK XPATH="//input[@data-name='FlightBookingForm_Origin']" 
 BUTTON=0
 EVENT TYPE=KEYPRESS XPATH="//input[@data-name='FlightBookingForm_Origin']" 
 CHAR="H"
 EVENTS TYPE=KEYPRESS XPATH="//input[@data-name='FlightBookingForm_Origin']" 
 KEYS="[37,13]"

Method 2 Xpath Form Filling

 VERSION BUILD=9030808 RECORDER=FX

 TAB T=1
 URL GOTO=http://www.etihad.com/en-ae/
 EVENT TYPE=CLICK XPATH="//input[@data-name='FlightBookingForm_Origin']" BUTTON=0
 WAIT SECONDS=5
 TAG POS=1 TYPE=INPUT:TEXT FORM=ID:wrapper ATTR=ID:frm_2012158061206151234 
 CONTENT=Abu<SP>Dhabi,<SP>Abu<SP>Dhabi<SP>Airport<SP>(AUH),
 <SP>United<SP>Arab<SP>Emirates
 TAG POS=1 TYPE=A ATTR=ID:ui-active-menuitem
 WAIT SECONDS=5
 EVENT TYPE=CLICK XPATH="//input[@data-name='FlightBookingForm_Destination']" BUTTON=0
 WAIT SECONDS=5
 TAG XPATH = "//input[@data-name='FlightBookingForm_Destination']" 
 CONTENT=London,<SP>Heathrow<SP>Airport<SP>(LHR),<SP>United<SP>Kingdom
 WAIT SECONDS=5
 TAG POS=1 TYPE=A ATTR=ID:ui-active-menuitem
 WAIT SECONDS=5

Upvotes: 0

Views: 465

Answers (1)

Shugar
Shugar

Reputation: 5299

The following way seems to work:

SET !REPLAYSPEED MEDIUM
EVENT TYPE=CLICK XPATH="//input[@data-name='FlightBookingForm_Origin']" BUTTON=0
EVENTS TYPE=KEYPRESS XPATH="//input[@data-name='FlightBookingForm_Origin']" CHARS="Abu Dhabi"
TAG XPATH="id('frm_2012158061206151234ui_autocomplete')/descendant::a"

EVENT TYPE=CLICK XPATH="//input[@data-name='FlightBookingForm_Destination']" BUTTON=0
EVENTS TYPE=KEYPRESS XPATH="//input[@data-name='FlightBookingForm_Destination']" CHARS="Heathrow"
TAG XPATH="id('frm_20121580612061235ui_autocomplete')/descendant::a"

Upvotes: 1

Related Questions