Class: Drobots::O2OnlineRechnung

Inherits:
Drobot
  • Object
show all
Defined in:
lib/drobots/o2_online_rechnung.rb

Constant Summary

Constants inherited from Drobot

Drobot::BASEDIR, Drobot::VERSION

Instance Method Summary collapse

Methods inherited from Drobot

#credential, #download, #initialize, #prefix, #title

Constructor Details

This class inherits a constructor from Drobot

Instance Method Details

#runObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/drobots/o2_online_rechnung.rb', line 5

def run
  visit "https://m.o2online.de/?a=1&login=1"

  within('form[name=Login]') do
    fill_in 'IDToken1', :with => credential('username')
    fill_in 'IDToken2', :with => credential('password')
    page.save_screenshot('/tmp/screenshots/00-mein-o2.png')
    click_button 'Einloggen'
  end

  visit "https://www.o2online.de/ecare/uebersicht?10&mobile#nav-list-bill"
  click_link "Rechnung"

  within('form') do
    fill_in 'Kundenkennzahl', :with => credential('pin')
    click_link 'Abschicken'
  end

  click_link 'Rechnung'

  l = find_link "Rechnung"
  puts l[:href]
end