1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| var nb_art = 176
var oncontinue = "CODE:";
oncontinue += "VERSION BUILD=8920312 RECORDER=FX" + "\n";
oncontinue += "SET !EXTRACT_TEST_POPUP NO" + "\n";
oncontinue += "SET !DATASOURCE C:\\PRESTASHOP\\***\\***.csv" + "\n";
oncontinue += "SET !DATASOURCE_COLUMNS 1" + "\n";
oncontinue += "SET !LOOP 1" + "\n";
oncontinue += "SET !TIMEOUT 50" + "\n";
oncontinue += "SET !DATASOURCE_LINE {{i}}" + "\n";
oncontinue += "TAB CLOSEALLOTHERS" + "\n";
oncontinue += "TAB T=1" + "\n";
oncontinue += "URL GOTO=http://www.*****.fr/" + "\n";
oncontinue += "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:search ATTR=TYPE:text&&CLASS:search-input&&SIZE:24&&NAME:motclef CONTENT={{!COL1}}" + "\n";
oncontinue += "TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:search ATTR=TYPE:image&&CLASS:search-image&&ALT:&&SRC:../images/search-button.jpg" + "\n";
oncontinue += "WAIT SECONDS=1" + "\n";
oncontinue += "ADD !EXTRACT {{!COL1}}" + "\n";
oncontinue += "WAIT SECONDS=1" + "\n";
oncontinue += "TAG POS=1 TYPE=div ATTR=id:desc-texte EXTRACT=htm" + "\n";
oncontinue += "WAIT SECONDS=1" + "\n";
oncontinue += "TAG POS=2 TYPE=div ATTR=id:desc-texte EXTRACT=htm" + "\n";
oncontinue += "WAIT SECONDS=1" + "\n";
oncontinue += "" + "\n";
function Remplace(expr,a,b) {
var ii=0
while (ii!=-1) {
ii=expr.indexOf(a,ii);
if (ii>=0) {
expr=expr.substring(0,ii)+b+expr.substring(ii+a.length);
ii+=b.length;
}
}
return expr
}
for(i=1;i<=(nb_art);i++){
iimSet("i",i);
iimPlay(oncontinue);
var extractedtext=iimGetLastExtract();
var extractedtext2 = Remplace(extractedtext,"[EXTRACT]","|")
var extractedtext3 = Remplace(extractedtext2,'"',"[GUILLEMETDOUBLE]")
var extractedtext4 = Remplace(extractedtext3,'<br>',"[B<>R]")
iimSet("extractedtext4",extractedtext4);
iimPlay("code: set !extract {{extractedtext4}}\n SAVEAS TYPE=EXTRACT FOLDER=C:\\***\\*** FILE=***.csv");
} |
Partager