aboutsummaryrefslogtreecommitdiff
path: root/selenium
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-10-29 23:37:18 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-10-29 23:37:18 +0100
commit0f9fef41b069a29b5b25308b34fbb6db51fe2305 (patch)
treea697303be5e24e336b8faa630dc37b2ca1adccf5 /selenium
parent50512f5f6ec8b8039a6bcadf0f0e0efa4d917c9e (diff)
print browser log on selenium pay failure
Diffstat (limited to 'selenium')
-rw-r--r--selenium/withdraw_buy.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/selenium/withdraw_buy.py b/selenium/withdraw_buy.py
index bc543143d..e782cb905 100644
--- a/selenium/withdraw_buy.py
+++ b/selenium/withdraw_buy.py
@@ -83,6 +83,12 @@ def is_error(client):
return True
return False
+def print_log(client):
+ print("--- Dumping browser log: ---")
+ for log in client.get_log("browser"):
+ print(log['level'] + ': ' + log['message'])
+ print("--- End of browser log ---")
+
def switch_base():
"""If 'test' is in TALER_BASEURL, then make it be 'demo', and viceversa.
@@ -173,6 +179,7 @@ def buy_article(client, title, fulfillment_url=None):
logger.info("Pay button turned clickable")
except TimeoutException:
logger.error('Could not confirm payment on blog')
+ print_log(client)
abort(client)
confirm_pay.click()
time.sleep(3)