From 16312833a4d111239027c5bc9460049becffecff Mon Sep 17 00:00:00 2001 From: Thomas Wade Date: Tue, 21 Apr 2020 16:16:54 +0930 Subject: [PATCH] Save account username --- FAAPI.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FAAPI.py b/FAAPI.py index e77b483..90e822b 100644 --- a/FAAPI.py +++ b/FAAPI.py @@ -32,6 +32,9 @@ class FAAPI: while not self._driver.find_elements_by_id('my-username'): pass + # Save the username of the account we've logged in as + self.username = self._driver.find_elements_by_css_selector('#my-username:not(.hideondesktop)')[0].text.strip() + # Extract the cookies and stop the driver self._cookies = self._driver.get_cookies() self._driver.close()