Sha256: 7aaa773c9f3e07a8543362ab821571f354abd32089888f266f47f85a321859ab
Contents?: true
Size: 1.49 KB
Versions: 1
Compression:
Stored size: 1.49 KB
Contents
require "bundler/setup" require "girbot" class PlataEon < Girbot::Step def action options = {} validate_auth(options) validate_card(options) goto 'https://myline-eon.ro/login' text_in_textfield(options[:details][:auth][:user], id: 'username') text_in_textfield(options[:details][:auth][:pass], id: 'password') sleep 1 click(:button, type: 'submit') # goto 'https://myelectrica.ro/index.php?pagina=plateste-online' # sleep 1 # fire id: 'myelectrica_checkall' # click(:button, type: 'submit') # sleep 1 # click(:button, id: 'requestMobilPay') # text_in_textfield(options[:details][:card][:number], id: 'paymentCardNumber') # text_in_textfield(options[:details][:card][:name], id: 'paymentCardName') # browser.execute_script("document.getElementById('paymentExpMonth').style.opacity='1';") # select_value(options[:details][:card][:expMonth], id: 'paymentExpMonth') # browser.execute_script("document.getElementById('paymentExpYear').style.opacity='1';") # select_value(options[:details][:card][:expYear], id: 'paymentExpYear') # text_in_textfield(options[:details][:card][:ccv], id: 'paymentCVV2Number') # click(:button, type: 'submit') loop do sleep 1 end end end PlataEon.run( headless: false, closeBrowser: false, browser: Girbot::BrowserHolder.new(:chrome, nil), details: { auth: Girbot::Step.read('./examples/details.json')[:auth][0], card: Girbot::Step.read('./examples/details.json')[:cards][0] } )
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
girbot-0.1.2 | examples/plata_eon.rb |