module Ba::Helpers::BancolombiaHelper

Private Instance Methods

agent() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 59
def agent
  @agent ||= Mechanize.new
end
first_question() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 47
def first_question
  ask(go_to_authentication_path.search("#luserAnswer1").text.strip)
end
get_balance_page() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 55
def get_balance_page
  balancePage = agent.get("/olb/BeginInitializeActionFromCM?from=pageTabs")
end
get_password() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 43
def get_password
  ask("Password: ") { |q| q.echo = false }
end
get_password_path() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 31
def get_password_path
  @password_path ||= agent.get("https://bancolombia.olb.todo1.com/olb/GetUserProfile")
end
get_question_form() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 13
def get_question_form
  @question_form ||= go_to_authentication_path.form_with(name: "checkChallQuestForm")
end
get_username() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 39
def get_username
  ask("Username: ")
end
go_to_authentication_path() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 5
def go_to_authentication_path
  @auth_path ||= agent.get("https://bancolombia.olb.todo1.com/olb/Authentication")
end
go_to_root() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 17
def go_to_root
  agent.get "https://bancolombia.olb.todo1.com/olb/Init"
end
login_path() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 21
def login_path
  agent.get "https://bancolombia.olb.todo1.com/olb/Login"
end
login_path_form(username) click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 25
def login_path_form(username)
  login_path.form_with(name: "authenticationForm") do |f|
    f.userId = username || get_username
  end
end
need_to_answer_banks_questions?() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 9
def need_to_answer_banks_questions?
  !get_question_form.nil?
end
password_path_body() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 35
def password_path_body
  get_password_path.body
end
second_question() click to toggle source
# File lib/ba/helpers/bancolombia_helper.rb, line 51
def second_question
  ask(go_to_authentication_path.search("#luserAnswer2").text.strip)
end