This commit is contained in:
Marcello Stanisci 2017-07-19 22:05:22 +02:00
parent f31c6d0190
commit 8d5b1e539b
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F

View File

@ -29,7 +29,8 @@ display = Display(visible=0, size=(1024, 768))
def abort(client): def abort(client):
client.quit() client.quit()
if display.old_display_var: if hasattr(display, "old_display_var"):
print("Kill display")
display.stop() display.stop()
sys.exit(1) sys.exit(1)
@ -245,12 +246,7 @@ def withdraw(client, amount_menuentry=None):
# Confirm exchange (in-wallet page) # Confirm exchange (in-wallet page)
try: try:
logger.info("Polling for the button") logger.info("Polling for the button")
exchange_input = client.find_element(By.XPATH, "//input[@class='url']") accept_exchange = wait.until(EC.element_to_be_clickable((By.XPATH, "//button[@class='pure-button button-success']")))
# Construct Exchange URL
l = list(parse.urlsplit(taler_baseurl))
l[1] = "exchange" + "." + l[1]
exchange_input.send_keys(parse.urlunsplit(l))
accept_exchange = wait.until(EC.element_to_be_clickable((By.XPATH, "//button[1]")))
except TimeoutException: except TimeoutException:
logger.error("Could not confirm exchange") logger.error("Could not confirm exchange")
abort(client) abort(client)
@ -315,5 +311,6 @@ make_donation(client, "1.0 TESTKUDOS")
logger.info("Bookmarked purchase: '%s'" % ret) logger.info("Bookmarked purchase: '%s'" % ret)
logger.info("Test passed") logger.info("Test passed")
client.quit() client.quit()
if hasattr(display, "old_display_var"):
display.stop() display.stop()
sys.exit(0) sys.exit(0)