使用Javascript或iMacros关闭文件上载窗口

时间:2017-05-21 13:59:46

标签: javascript imacros

我尝试使用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关闭文件上传窗口?

0 个答案:

没有答案