我尝试使用iMacros和Javascript在此site中将文件上传到自己。 但是当我单击文件上传窗口时,窗口永远不会关闭。
这是我的imacros代码:
send_message ="CODE:";
send_message += 'EVENT TYPE=CLICK SELECTOR="#main>HEADER>DIV:nth-of-type(3)>DIV>DIV:nth-of-type(2)>BUTTON" BUTTON=0'+"\n";
send_message += 'WAIT SECONDS=1'+"\n";
send_message += 'EVENT TYPE=CLICK SELECTOR="#main>HEADER>DIV:nth-of-type(3)>DIV>DIV:nth-of-type(2)>SPAN>DIV>DIV>UL>LI>BUTTON" BUTTON=0'+"\n";
send_message += 'WAIT SECONDS=1'+"\n";
send_message += 'TAG POS=1 TYPE=INPUT:FILE ATTR=* CONTENT=/Users/user/Downloads/image002.jpg'+"\n";
send_message += 'WAIT SECONDS=1'+"\n";
send_message += 'EVENT TYPE=CLICK SELECTOR="#app>DIV>DIV>DIV>SPAN:nth-of-type(2)>DIV>SPAN>DIV>DIV>DIV:nth-of-type(2)>SPAN:nth-of-type(2)>DIV>BUTTON" BUTTON=0'+"\n";
send_message_code = iimPlay(send_message);
如何直接使用Javascript或使用iMacros关闭文件上传窗口?