简体   繁体   English

iMacros帧名称故障排除

[英]iMacros Frame Name Trouble Shooting

I am having a issue with my frame names constantly changing I have tried FRAME NAME=* and various other ways. 我在不断更改框架名称时遇到问题,我尝试了FRAME NAME = *和其他多种方式。 I Think its not working because the webpage is set up as different html tabs.. I am not sure why but its not allowing me to extract any data from a separate hmtl tab that I open. 我认为它不起作用,因为该网页设置为不同的html选项卡。.我不确定为什么,但是不允许我从打开的单独的hmtl选项卡中提取任何数据。 I am thinking this is the issue but I cant figure it out.. Thanks 我以为这是问题,但我想不出来..谢谢

openAndExtract = "Code: ";
openAndExtract += "FRAME NAME="ext-comp-1494"" + NewLine;
openAndExtract += "TAG POS=1 TYPE=DIV ATTR=TXT:There<SP>are<SP>no<SP>updates." + NewLine;
openAndExtract += "FRAME F=0" + NewLine;
openAndExtract += "TAG POS=3 TYPE=SPAN ATTR=TXT:01000978" + NewLine;
openAndExtract += "FRAME NAME="ext-comp-1489"" + NewLine;
openAndExtract += "TAG POS=3 TYPE=DIV ATTR=TXT:Search<SP>this<SP>feed<SP>|<SP>ShowAll<SP>Updates<SP>ShowAll*" + NewLine;
openAndExtract += "FRAME F=0" + NewLine;
openAndExtract += "TAG POS=3 TYPE=SPAN ATTR=TXT:01008153" + NewLine;
openAndExtract += "FRAME NAME="ext-comp-1484"" + NewLine;
openAndExtract += "TAG POS=3 TYPE=DIV ATTR=TXT:Search<SP>this<SP>feed<SP>|<SP>ShowAll<SP>Updates<SP>ShowAll*" + NewLine;
openAndExtract += "FRAME F=0" + NewLine;
openAndExtract += "TAG POS=1 TYPE=EM ATTR=ID:ext-gen119" + NewLine;
openAndExtract += "FRAME NAME="ext-comp-1006"" + NewLine;
alert(iimGetLastExtract ());
PlayMacro = iimPlay(openAndExtract);

For this you have to dig in into HTML code. 为此,您必须深入研究HTML代码。 Compare the value you've recorded with iMacros and try to find in HTML code of the web page. 比较您使用iMacros记录的值,然后尝试在网页的HTML代码中查找。 In order to extract it from HTML code you will have to use some kind of regular expression or regex . 为了从HTML代码中提取它,您将必须使用某种正则表达式或regex。

Then you have to use 2 macros . 然后,您必须使用2个宏。 First to extract the HTML code, then JavaScript with extract the NAME value from HTML. 首先提取HTML代码,然后使用JavaScript从HTML中提取NAME值。 And when you have it you will use it in second macro. 当您拥有它时,将在第二个宏中使用它。

Example: 例:

var macro1;

macro1 ="CODE:";
macro1 +="TAG POS=1 TYPE=DIV ATTR=CLASS:some_class EXTRACT=HTM";

var macro2;

macro2 ="CODE:";
macro2 +='FRAME NAME="{{name}}"'+"\n";
macro2 +="TAG POS=1 TYPE=DIV ATTR=CLASS:some_other_class "+"\n";

iimPlay(macro1)

var name=iimGetLastExtract();

name=name.match(/some_regular_expresion/);

iimSet("name",name)

iimPlay(macro2)

This would be the method. 这就是方法。 The rest is up to you. 其余的取决于您。 There is possibility that you will not find that name property since it can be hidden. 您可能找不到该名称属性,因为它可以隐藏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM