我想在搜索输入控件中点击Enter键时提交表单,因为提交按钮不可用。
当我手动按Enter键时,它正常工作:搜索关键字已成功提交。但是当我使用iMacros录制成功的按键事件时,它在重放期间不会执行任何操作。该事件记录为KEY=13
。
我使用的iMacros代码:
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)>DIV>UL>LI:nth-of-type(2)>BUTTON" BUTTON=0
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)>DIV>FORM:nth-of-type(2)>TEXTAREA" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)>DIV>FORM:nth-of-type(2)>TEXTAREA" CHARS="2nd search"
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)" KEY=13
以下是我案例的测试页:http://zeccartourisme.com/test.html