我需要将页数放入输入栏并点击进入,进行搜索。我尝试使用EVENT模式进行录制,但在按任意键时无法录制。
这是我输入页码的代码
EVENT TYPE=CLICK SELECTOR="#searchResults>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV:nth-of-type(2)" BUTTON=0
EVENT TYPE=KEYPRESS SELECTOR="#searchResults>DIV>DIV>DIV>DIV:nth-of-type(2)>INPUT" CHAR="9"
EVENT TYPE=KEYPRESS SELECTOR="#searchResults>DIV>DIV>DIV>DIV:nth-of-type(2)>INPUT" KEY=13
代码不会返回任何错误,但输入键未按下 我也试过这样:
EVENT TYPE=KEYPRESS SELECTOR="div[class='page']" KEY=13
HTML的结构:
答案 0 :(得分:1)
尝试以下命令:
EVENT TYPE=KEYDOWN SELECTOR="#searchResults>DIV>DIV>DIV>DIV:nth-of-type(2)>INPUT" KEY=13
或
EVENT TYPE=KEYUP SELECTOR="#searchResults>DIV>DIV>DIV>DIV:nth-of-type(2)>INPUT" KEY=13