Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def grab_check_start():
- try:
- g.go('https://desktop.onlive.com/login', log_file = 'log.html')
- print g.response.body
- login_status = g.xpath_text('/html/body/div[2]/section/div/h1')
- if login_status == 'Sign In':
- g.set_input('userpass', 's45fdfx65')
- g.submit()
- except DataNotFound:
- pass
- g.go('https://desktop.onlive.com/account', log_file = 'log3.html')
- print g.response.body
- g.go('/account/update_billing', log_file = 'billing.html')
- print g.response.body
- g.set_input('cardname', str(self.First_name_input.text()))
- g.set_input('cardnum', str(self.cc_number_input.text()))
- type_check = str(self.cc_number_input.text())
- if type_check[0] == '4':
- cc_type = 'Visa'
- elif type_check[0] == '5':
- cc_type = 'MasterCard'
- elif type_check[0] == '6':
- cc_type = 'Discover'
- g.set_input('cardtype', cc_type)
- g.set_input('seccode', str(self.Cvv_input.text()))
- g.set_input('expirymonth', str(self.Exp_mm.currentText()))
- g.set_input('expiryyear', str(self.Exp_year.currentText()))
- g.submit()
- print g.response.body
- try:
- check_result = g.xpath_text('/html/body/div[2]/section/div/form/div')
- print check_result
- if check_result == 'There was a problem with the billing information you have provided.':
- cc_status = 'Cc not valid'
- self.Check_status.setText(" " + cc_status)
- else:
- cc_status = 'Cc Valid'
- self.Check_status.setText(" " + cc_status)
- except DataNotFound:
- print('Check Error, see logs')
Advertisement
Add Comment
Please, Sign In to add comment