带有imacros的棘手的文本框

时间:2016-03-08 17:20:21

标签: captcha imacros

我想要填充Captcha的{​​{1}}文本框有点棘手。文本框中包含以下代码:

iMacros

我可以使用<input data-prevent-submit="false" class="captcha_input form-element form-element-textfield textfield js-component" value="" name="chapter:chapter_body:fieldset:fieldset_body:captchaTextFieldItem:captchaText FieldItem_body:captchaTextField" id="ide7" placeholder="Zeichen aus Bild eingeben" data-component="Textfield" type="text"> 填写表单并提交,但它不起作用。似乎文本框无法识别我的输入。也许我必须首先关注盒子而不是填满它。

我的imacros代码很简单:

iMacros

提前感谢您的帮助!

干杯,克里斯

下面是网站代码:

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:id* ATTR=ID:ide7 CONTENT={{!VAR1}}
TAG POS=1 TYPE=BUTTON FORM=ID:ide3 ATTR=ID:ide4

这里记录的宏:

<div class="layer-body">


<div class="captcha">
<form id="idf5" method="post" action="./popImap;jsessionid=7694A5FB6B8DC9BBD48C31C42BFCE41A-n1.bs54a?2-1.IFormSubmitListener-topLevelContainer-dialog-root~container-container-form" class="m-form"><div style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden"><input name="idf5_hf_0" id="idf5_hf_0" type="hidden"></div><div style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden"><input autocomplete="off" type="text"><input name="chapter:chapter_body:bottomButtons:container:bottomButtons_body:ok" onclick=" var b=document.getElementById('idf6'); if (b!=null&amp;&amp;b.onclick!=null&amp;&amp;typeof(b.onclick) != 'undefined') {  var r = Wicket.bind(b.onclick, b)(); if (r != false) b.click(); } else { b.click(); };  return false;" type="submit"></div>
<div class="form-chapter">

<h4 class="headline-layout4 headline">Sicherheitsabfrage</h4>

<p class="paragraph">Helfen Sie uns Spam zu bekämpfen! Bitte geben Sie den angezeigten Code ein.</p>
<div id="idf7" style="display:none"></div>
<fieldset class="m-form-fieldset m-form-fieldset-styled-variant-b">
<div class="m-form-fieldset-styled_wrapper">

<div class="captcha_image-container">
<span class="captcha_spinner"></span>
<img class="captcha_image" id="idf8" src="./popImap;jsessionid=7694A5FB6B8DC9BBD48C31C42BFCE41A-n1.bs54a?2-IResourceListener-topLevelContainer-dialog-root~container-container-form-chapter-chapter_body-fieldset-fieldset_body-captchaImage&amp;antiCache=1457521123954">
</div>
<div class="m-form-item">

<div class="m-form-item_container">

<input data-prevent-submit="false" class="captcha_input form-element form-element-textfield textfield js-component" value="" name="chapter:chapter_body:fieldset:fieldset_body:captchaTextFieldItem:captchaTextFieldItem_body:captchaTextField" id="idf9" placeholder="Zeichen aus Bild eingeben" data-component="Textfield" type="text">
<a id="idf3" href="javascript:;" class="icon-link js-component" data-component="IconLink" icon="refresh">
<i class="m-icon icon-link_icon"></i>
</a>

</div>
</div>

</div>
</fieldset>
    <p class="paragraph">Mit dieser Maßnahme schützen wir vor ungewollten Manipulationen</p>

<div class="m-button-container m-button-container-right">

<button  name="chapter:chapter_body:bottomButtons:container:bottomButtons_body:cancel" id="idf4" value="Abbrechen" type="button" class="button-size-normal m-button button-transparent js-component button-secondary layer-close" data-component="Button">
Abbrechen


    </button>
    <button name="chapter:chapter_body:bottomButtons:container:bottomButtons_body:ok" id="idf6" value="Speichern" class="button-size-normal m-button button-cta js-component" data-component="Button">
Speichern


</button>

</div>


</div> 
</form>
</div>

</div>

2 个答案:

答案 0 :(得分:1)

选择该文本字段的XPATH并尝试以下代码。

URL GOTO=https://navigator.web.de/?sid=8266e33e4a68f4dc2245fcc7e22063633d603457ed697b8c7aa7cf77306e5e1462f3096157b0b1bc031b669d19bc9df1&tz=1#mail FRAME NAME="mail"
TAG POS=1 TYPE=BUTTON FORM=ID:id89 ATTR=ID:id8a 
EVENTS TYPE=KEYPRESS XPATH="//select[@id="billing:country_id"]" CHARS={{!VAR1}}
TAG POS=1 TYPE=BUTTON FORM=ID:ide3 ATTR=ID:ide4

答案 1 :(得分:1)

非常感谢您的帮助!

我更改了录制模式并最终解决了它:

FRAME NAME="mail"
CLICK X=365 Y=317
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:id* ATTR=ID:id* CONTENT={{!VAR1}}
wait seconds=5
TAG POS=1 TYPE=BUTTON FORM=ID:ide3 ATTR=ID:ide4
在TAG TYPE之前

容易; - )