19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/vantiv/certification/paypage_driver.rb', line 19
def get_paypage_registration_id(card_number, cvv = '123')
driver.navigate.to paypage_server.root_path
driver.switch_to.frame('vantiv-payframe')
driver.find_element(:id, 'accountNumber').send_keys card_number
driver.find_element(:id, 'cvv').send_keys cvv
driver.switch_to.default_content
button = driver.find_element(:id, 'submit')
button.click
wait = Selenium::WebDriver::Wait.new(:timeout => 10)
wait.until {
driver.find_element(:id, "request-status").text.include?("Request Complete")
}
driver.find_element(:id, 'temp-token').text
end
|