module BankApi::Clients::Navigation::BancoSecurity::CompanyNavigation

Constants

BASE_URL

Public Instance Methods

goto_account_details(account_number) click to toggle source
# File lib/bank_api/clients/navigation/banco_security/company_navigation.rb, line 70
def goto_account_details(account_number)
  wait("a.clickable:contains(\"#{account_number}\")").click
end
goto_balance() click to toggle source
# File lib/bank_api/clients/navigation/banco_security/company_navigation.rb, line 53
def goto_balance
  goto_frame query: '#topFrame'
  selenium_browser.execute_script(
    "MM_goToURL('parent.frames[\\'topFrame\\']','../menu/MenuTopInicio.asp'," +
    "'parent.frames[\\'leftFrame\\']','../menu/MenuInicio.asp'," +
    "'parent.frames[\\'mainFrame\\']','../../../noticias/arriba_noticias.asp');" +
    "return document.MM_returnValue;"
  )
  selenium_browser.execute_script(
    "MM_goToURL('parent.frames[\\'mainFrame\\']'," +
    "'/empresas/RedirectConvivencia.asp?urlRedirect" +
    "=Cartola/Home/CartolaOrSaldoCuentaCorriente')"
  )
  goto_frame query: '#mainFrame'
  goto_frame query: 'iframe[name="central"]', should_reset: false
end
goto_company_dashboard(company_rut = nil) click to toggle source
# File lib/bank_api/clients/navigation/banco_security/company_navigation.rb, line 20
def goto_company_dashboard(company_rut = nil)
  goto_frame query: '#topFrame'
  if browser.search(".empresa a:contains(\"cambiar\")").any?
    selenium_browser.execute_script(
      "MM_goToURL('parent.frames[\\'mainFrame\\']'," +
        "'/empresas/RedirectConvivencia.asp?urlRedirect=Perfilamiento/Home/Index')"
    )
  end
  goto_frame query: '#mainFrame'
  goto_frame(query: 'iframe[name="central"]', should_reset: false)
  selenium_browser.execute_script(
    "submitEntrar(true,1," +
      "#{without_verifier_digit_or_separators(company_rut || @company_rut)}," +
      "'#{verifier_digit(company_rut || @company_rut)}');"
  )
end
goto_deposits() click to toggle source
# File lib/bank_api/clients/navigation/banco_security/company_navigation.rb, line 37
def goto_deposits
  goto_frame query: '#topFrame'
  selenium_browser.execute_script(
    "MM_goToURL('parent.frames[\\'topFrame\\']','../menu/MenuTopTransferencias.asp'," +
      "'parent.frames[\\'leftFrame\\']','../menu/MenuTransferencias.asp'," +
      "'parent.frames[\\'mainFrame\\']','../../../noticias/transferencias.asp');"
  )
  selenium_browser.execute_script(
    "MM_goToURL('parent.frames[\\'mainFrame\\']'," +
      "'/empresas/RedirectConvivencia.asp?urlRedirect=CartolasTEF/Home/Index')"
  )
  goto_frame query: '#mainFrame'
  goto_frame query: 'iframe[name="central"]', should_reset: false
  wait('a.k-link:contains("Recibidas")').click
end
goto_login() click to toggle source
# File lib/bank_api/clients/navigation/banco_security/company_navigation.rb, line 6
def goto_login
  if session_expired?
    browser.search("button:contains('Ingresa nuevamente')").click
    browser.search("a:contains('Empresas')").click
  else
    browser.goto BASE_URL
    browser.search('#mrcBtnIngresa').click
  end
end
goto_transfer_form() click to toggle source
# File lib/bank_api/clients/navigation/banco_security/company_navigation.rb, line 90
def goto_transfer_form
  goto_frame query: '#topFrame'
  selenium_browser.execute_script(
    "MM_goToURL('parent.frames[\\'topFrame\\']','../menu/MenuTopTransferencias.asp'," +
      "'parent.frames[\\'leftFrame\\']','../menu/MenuTransferencias.asp'," +
      "'parent.frames[\\'mainFrame\\']','../../../noticias/transferencias.asp');"
  )
  selenium_browser.execute_script(
    "MM_goToURL('parent.frames[\\'mainFrame\\']'," +
      "'/empresas/RedirectConvivencia.asp?urlRedirect=Transferencia/Tabs/Home')"
  )
  goto_frame query: '#mainFrame'
  goto_frame query: 'iframe[name="central"]', should_reset: false
end
goto_withdrawals() click to toggle source
# File lib/bank_api/clients/navigation/banco_security/company_navigation.rb, line 74
def goto_withdrawals
  goto_frame query: '#topFrame'
  selenium_browser.execute_script(
    "MM_goToURL('parent.frames[\\'topFrame\\']','../menu/MenuTopTransferencias.asp'," +
      "'parent.frames[\\'leftFrame\\']','../menu/MenuTransferencias.asp'," +
      "'parent.frames[\\'mainFrame\\']','../../../noticias/transferencias.asp');"
  )
  selenium_browser.execute_script(
    "MM_goToURL('parent.frames[\\'mainFrame\\']'," +
      "'/empresas/RedirectConvivencia.asp?urlRedirect=CartolasTEF/Home/Index')"
  )
  goto_frame query: '#mainFrame'
  goto_frame query: 'iframe[name="central"]', should_reset: false
  wait('a.k-link:contains("Enviadas")').click
end
session_expired?() click to toggle source
# File lib/bank_api/clients/navigation/banco_security/company_navigation.rb, line 16
def session_expired?
  browser.search("button:contains('Ingresa nuevamente')").any?
end