Skip to content

Commit abe47f9

Browse files
committed
Add method: "is_chromium()" (True for Chrome/Edge/Opera)
1 parent a6b9f40 commit abe47f9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3235,6 +3235,15 @@ def inspect_html(self):
32353235
print(results)
32363236
return(results)
32373237

3238+
def is_chromium(self):
3239+
""" Return True if the browser is Chrome, Edge, or Opera. """
3240+
self.__check_scope()
3241+
chromium = False
3242+
browser_name = self.driver.__dict__["capabilities"]["browserName"]
3243+
if browser_name in ("chrome", "edge", "msedge", "opera"):
3244+
chromium = True
3245+
return chromium
3246+
32383247
def get_google_auth_password(self, totp_key=None):
32393248
""" Returns a time-based one-time password based on the
32403249
Google Authenticator password algorithm. Works with Authy.

0 commit comments

Comments
 (0)