|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Dec 2005
Città: Istanbul
Messaggi: 1817
|
[Ruby] Watir - Conferma di salvataggio
Vorrei utilizzare Watir per automatizzare il download di alcuni file da un sito web. La navigazione funziona benone, purtroppo pero' non riesco a confermare il download del file in teoria il seguente codice dovrebbe andare, in pratica il pulsante "Salva" non viene cliccato... qualcuno che abbia gia' usato questa libreria e abbia una idea ?
Codice:
require 'watir'
require 'watir\contrib\enabled_popup'
ie = Watir::IE.new_process
ie.goto 'http://www.foosite.com'
ie.text_field( :name, "bla1" ).set( "username")
ie.text_field( :name, "bla2" ).set( "password")
ie.button( :value, "Login" ).click
ie.link( :text, "Download files").click
ie.frame('').button(:type,'image').click_no_wait
hwnd = ie.enabled_popup(5)
w = WinClicker.new
w.makeWindowActive( hwnd )
w.clickWindowsButton_hwnd(hwnd,"Salva")
__________________
One of the conclusions that we reached was that the "object" need not be a primitive notion in a programming language; one can build objects and their behaviour from little more than assignable value cells and good old lambda expressions. —Guy Steele |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 15:19.



















