iMacros填写自动建议下拉列表

时间:2017-10-29 09:51:25

标签: imacros

我正在尝试填写iMacros上的自动建议表格但是尽管付出了所有的努力,它仍然无效。 我试过了

  

方法1   使用事件的想法

 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]"
  

方法2 Xpath表格填写

 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

2 个答案:

答案 0 :(得分:1)

以下方式似乎有效:

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"

答案 1 :(得分:0)

如果您使用的是iMacros浏览器,则可以使用http://wiki.imacros.net/DirectScreen_Technology方法。但这在Firefox插件中不可用(您可能已经知道)。