faustf Posted August 18, 2016 Posted August 18, 2016 hi guy i have a page web with image . This image is clickable , and have this code in page html <TD style="BORDER-TOP: gray 1px solid">Totale:</TD> <TD style="BORDER-TOP: gray 1px solid"><SPAN class=price_tot>0,00</SPAN> €</TD></TR></TBODY></TABLE></DIV><A id=checkout><IMG title=Spedisci alt=Spedisci src="img/spedisci.png"></A> </DIV><!--<div>* Il credito viene scalato al netto dell'iva.</div>--></DIV><!-- HTML HIDDEN DIALOGUES --><!-- to be filled by ajax (urlGetInvoiceRow) --><!-- to be filled by ajax (urlGetAccountCredit) --><!-- to be filled by ajax (urlSetAccountCredit) --><!-- to be filled by ajax (urlCallTrackShipmentHistoryRequest) --> <DIV id=address_book style="DISPLAY: none"> <DIV id=sect_sx><!--<div id="title_list_contacts"><div>PUNTI DI RITIRO</div></div>--> i tryed to clik them with this code Local $produ_sHTML_sporco = _IEBodyReadHTML($oIE) ConsoleWrite($produ_sHTML_sporco) Local $teste1 = _IEFormImageClick($oIE, "img/spedisci.png", "src") MsgBox(0, 'src', $teste1 & ' ' & @error & ' ' & @extended) Local $teste = _IEFormImageClick($oIE, "Spedisci", "alt") MsgBox(0, 'alt', $teste & ' ' & @error & ' ' & @extended) Local $teste2 = _IEFormImageClick($oIE, "http://www.spediamo.it/img/spedisci.png") MsgBox(0, 'link png', $teste2 & ' ' & @error & ' ' & @extended) Local $teste3 = _IEFormImageClick($oIE, "checkout", "id") MsgBox(0, 'id', $teste3 & ' ' & @error & ' ' & @extended) but return always error = 7 and extended = 2 7 i look in help _IEstatus no match , but first questions why no match ? if i see in console write ?? seconds questions what is 2 for extended ?? thankz at all
Danp2 Posted August 18, 2016 Posted August 18, 2016 You should try using _IEImgClick instead of _IEFormImageClick. faustf 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
killertone Posted August 19, 2016 Posted August 19, 2016 I dont know if this is the most effective way, but i always do it like this: $imgColl = _IETagNameGetCollection($oIE,"img") For $img In $imgColl if $img.src = "(The src found in the html)" then EndIf Next
killertone Posted August 19, 2016 Posted August 19, 2016 A Just now, killertone said: I dont know if this is the most effective way, but i always do it like this: $imgColl = _IETagNameGetCollection($oIE,"img") For $img In $imgColl if $img.src = "(The src found in the html)" then EndIf Next I dont know if this is the most effective way, but i always do it like this: $imgColl = _IETagNameGetCollection($oIE,"img") For $img In $imgColl if $img.src = "(The src found in the html)" then _IEAction($img,"click") EndIf Next faustf 1
faustf Posted August 19, 2016 Author Posted August 19, 2016 (edited) thnakz with _IEImgClick work perfect , i not saw this function Edited August 19, 2016 by faustf
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now