@@ -5195,12 +5195,12 @@ def is_chromedriver_too_old(self):
5195
5195
return True # chromedriver is too old! Please upgrade!
5196
5196
return False
5197
5197
5198
- def get_google_auth_password (self , totp_key = None ):
5198
+ def get_totp_code (self , totp_key = None ):
5199
5199
"""Returns a time-based one-time password based on the
5200
- Google Authenticator password algorithm. Works with Authy.
5201
- If "totp_key" is not specified, defaults to using the one
5202
- provided in seleniumbase/config/settings.py
5203
- Google Auth passwords expire and change at 30-second intervals.
5200
+ Google Authenticator algorithm. Works with Authy and Okta .
5201
+ If the "totp_key" is not specified, this method defaults
5202
+ to using the one provided in [ seleniumbase/config/settings.py].
5203
+ Google Authenticator codes expire & change at 30-sec intervals.
5204
5204
If the fetched password expires in the next 1.5 seconds, waits
5205
5205
for a new one before returning it (may take up to 1.5 seconds).
5206
5206
See https://pyotp.readthedocs.io/en/latest/ for details."""
@@ -6163,6 +6163,14 @@ def assert_element_not_present(
6163
6163
self .wait_for_element_absent (selector , by = by , timeout = timeout )
6164
6164
return True
6165
6165
6166
+ def get_google_auth_password (self , totp_key = None ):
6167
+ """ Same as self.get_totp_code() """
6168
+ return self .get_totp_code (totp_key = totp_key )
6169
+
6170
+ def get_google_auth_code (self , totp_key = None ):
6171
+ """ Same as self.get_totp_code() """
6172
+ return self .get_totp_code (totp_key = totp_key )
6173
+
6166
6174
def assert_no_broken_links (self , multithreaded = True ):
6167
6175
""" Same as self.assert_no_404_errors() """
6168
6176
self .assert_no_404_errors (multithreaded = multithreaded )
0 commit comments