2016-03-08 73 views
0

我有點棘手Captcha我想用iMacros來填寫文本框。文本框HAX下面的代碼:帶有圖像的整蠱文本框

<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> 

在這裏錄製的宏:

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 
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:ide3 ATTR=ID:ide7 CONTENT=Testinput 
    TAG POS=1 TYPE=BUTTON FORM=ID:ide3 ATTR=ID:ide4 

回答

1

很多感謝您的幫助!

我改變了記錄模式和finaly與解決它:

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

容易;-)

+0

它爲我工作,通過添加 - - >等待秒數= 1 – Ali

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 
+0

謝謝了。但是我不確定我必須在XPATH之後放置什麼:「...」來識別表單。 – swapfile

+0

我不清楚你的問題..你已經進入了正確的形式?...上面提到的代碼將重點放在字段中,然後輸入「VAR1」中的數據..可能你可以分享形式URL,我會chk並讓你知道 –

+0

不,我認爲這是問題。我並不是全部在表格中。我的問題是選擇表單。我不知道該怎麼做。共享是困難的,因爲它在登錄區域。 – swapfile