如何设置URL GOTO = javascript:输出到iMacros变量

问题描述 投票:0回答:1

我正在浏览URL GOTO = javascript的官方iMacros文档。

URL GOTO=http://demo.imacros.net/Automate/TestForm1
URL GOTO=javascript:window.document.getElementById("name").value='Test');

如何将Javascript的输出设置为iMacro变量?

Like SET !VAR1 {Javascriptoutput}

我的要求是将输出打印到csv,所以我想把JS输出设置为Macro变量然后将其打印到csv。

有什么输入吗?

imacros
1个回答
0
投票
var master1= "CODE:";
master1 += "VERSION BUILD=8820413 RECORDER=FX" + "\n";
master1 += "TAB T=1" + "\n";
master1 += "SET !ERRORIGNORE YES" + "\n";
master1 += "ADD !EXTRACT {{someValue}}" + "\n";     //name
master1 += "SAVEAS TYPE=EXTRACT FOLDER=* FILE=a.csv" + "\n";

//from the imacro code after extracting your text
        var someValue= iimGetLastExtract(1);
        iimSet("someValue",someValue);  //asssign the value so tat it adds to csv file

         iimPlay(master1);    //imacro code for saving
© www.soinside.com 2019 - 2024. All rights reserved.