class Menthol::Kasikornbank

Private Instance Methods

find_amount(name) click to toggle source
# File lib/menthol/kasikornbank.rb, line 28
def find_amount(name)
  case name
  when "Savings"
    frame = browser.iframe(id: "ssoIFrame1")
    cell  = frame.element(class: "inner_table_right").wait_until_present
    cell.text
  end
end
login() click to toggle source
# File lib/menthol/kasikornbank.rb, line 19
def login
  skip_login_popup
  submit_credentials({
    username: "userName",
    password: "password",
    button:   browser.image(name: "loginBtn"),
  })
end
login_url() click to toggle source
# File lib/menthol/kasikornbank.rb, line 8
def login_url
  "https://online.kasikornbankgroup.com/K-Online/preLogin/popupPreLogin.jsp?lang=en&type="
end
logout() click to toggle source
# File lib/menthol/kasikornbank.rb, line 37
def logout
  button = browser.span(text: "Logout")
  button.click
  browser.alert.ok
  button.wait_while_present
end
skip_login_popup() click to toggle source
# File lib/menthol/kasikornbank.rb, line 12
def skip_login_popup
  button = browser.input(css: "div[align=center] input")
  button.wait_until_present
  button.click
  button.wait_while_present
end