From 3574e6e66301d1546a3750d9fb818be51d114cfc Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Wed, 4 Dec 2024 08:26:41 +0100 Subject: [PATCH] fix login by waiting a little * we need to reload the page, by navigating to the base url once more --- grafanimate/grafana.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grafanimate/grafana.py b/grafanimate/grafana.py index be26648..e45ede1 100644 --- a/grafanimate/grafana.py +++ b/grafanimate/grafana.py @@ -72,8 +72,9 @@ def login(self, username, password): log.info("Logging in") javascript = mkjscall("grafanaStudio.login", username, password) self.run_javascript(javascript) - # the login works, but it is not shown even after reload - # self.navigate(self.baseurl) + # the login works, we need to wait a bit and reload the page + time.sleep(0.5) + self.navigate(self.baseurl) def open_dashboard(self, uid, options=None): """