Skip to content

Commit a6b9f40

Browse files
committed
Use quotes consistently (double over single)
1 parent 50f26aa commit a6b9f40

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def click(self, selector, by=By.CSS_SELECTOR, timeout=None, delay=0):
165165
if delay and delay > 0:
166166
time.sleep(delay)
167167
try:
168-
if self.browser == 'ie' and by == By.LINK_TEXT:
168+
if self.browser == "ie" and by == By.LINK_TEXT:
169169
# An issue with clicking Link Text on IE means using jquery
170170
self.__jquery_click(selector, by=by)
171171
elif self.browser == "safari":
@@ -685,7 +685,7 @@ def click_link_text(self, link_text, timeout=None):
685685
timeout = settings.SMALL_TIMEOUT
686686
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
687687
timeout = self.__get_new_timeout(timeout)
688-
if self.browser == 'phantomjs':
688+
if self.browser == "phantomjs":
689689
if self.is_link_text_visible(link_text):
690690
element = self.wait_for_link_text_visible(
691691
link_text, timeout=timeout)
@@ -787,7 +787,7 @@ def click_partial_link_text(self, partial_link_text, timeout=None):
787787
timeout = settings.SMALL_TIMEOUT
788788
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
789789
timeout = self.__get_new_timeout(timeout)
790-
if self.browser == 'phantomjs':
790+
if self.browser == "phantomjs":
791791
if self.is_partial_link_text_visible(partial_link_text):
792792
element = self.wait_for_partial_link_text(partial_link_text)
793793
element.click()
@@ -2052,7 +2052,7 @@ def get_new_driver(self, browser=None, headless=None, locale_code=None,
20522052
# WebDrivers can get closed during tearDown().
20532053
pass
20542054
else:
2055-
if self.browser == 'chrome' or self.browser == 'edge':
2055+
if self.browser == "chrome" or self.browser == "edge":
20562056
width = settings.CHROME_START_WIDTH
20572057
height = settings.CHROME_START_HEIGHT
20582058
try:
@@ -2063,7 +2063,7 @@ def get_new_driver(self, browser=None, headless=None, locale_code=None,
20632063
self.wait_for_ready_state_complete()
20642064
except Exception:
20652065
pass # Keep existing browser resolution
2066-
elif self.browser == 'firefox':
2066+
elif self.browser == "firefox":
20672067
width = settings.CHROME_START_WIDTH
20682068
try:
20692069
if self.maximize_option:
@@ -2073,7 +2073,7 @@ def get_new_driver(self, browser=None, headless=None, locale_code=None,
20732073
self.wait_for_ready_state_complete()
20742074
except Exception:
20752075
pass # Keep existing browser resolution
2076-
elif self.browser == 'safari':
2076+
elif self.browser == "safari":
20772077
width = settings.CHROME_START_WIDTH
20782078
if self.maximize_option:
20792079
try:
@@ -2086,7 +2086,7 @@ def get_new_driver(self, browser=None, headless=None, locale_code=None,
20862086
self.driver.set_window_rect(10, 30, width, 630)
20872087
except Exception:
20882088
pass
2089-
elif self.browser == 'opera':
2089+
elif self.browser == "opera":
20902090
width = settings.CHROME_START_WIDTH
20912091
if self.maximize_option:
20922092
try:
@@ -2370,14 +2370,14 @@ def highlight(self, selector, by=By.CSS_SELECTOR,
23702370

23712371
if self.highlights:
23722372
loops = self.highlights
2373-
if self.browser == 'ie':
2373+
if self.browser == "ie":
23742374
loops = 1 # Override previous setting because IE is slow
23752375
loops = int(loops)
23762376

23772377
o_bs = '' # original_box_shadow
23782378
try:
23792379
style = element.get_attribute('style')
2380-
except (StaleElementReferenceException, ENI_Exception):
2380+
except Exception:
23812381
self.wait_for_ready_state_complete()
23822382
time.sleep(0.12)
23832383
element = self.wait_for_element_visible(
@@ -3182,7 +3182,7 @@ def assert_no_js_errors(self):
31823182
raise Exception(
31833183
"JavaScript errors found on %s => %s" % (current_url, errors))
31843184
if self.demo_mode:
3185-
if (self.browser == 'chrome' or self.browser == 'edge'):
3185+
if (self.browser == "chrome" or self.browser == "edge"):
31863186
a_t = "ASSERT NO JS ERRORS"
31873187
if self._language != "English":
31883188
from seleniumbase.fixtures.words import SD
@@ -6034,7 +6034,7 @@ def __get_improved_exception_message(self):
60346034
maybe_using_old_chromedriver = False
60356035
if "unknown error: call function result missing" in exc_message:
60366036
maybe_using_old_chromedriver = True
6037-
if self.browser == 'chrome' and maybe_using_old_chromedriver:
6037+
if self.browser == "chrome" and maybe_using_old_chromedriver:
60386038
update = ("Your version of ChromeDriver may be out-of-date! "
60396039
"Please go to "
60406040
"https://sites.google.com/a/chromium.org/chromedriver/ "

0 commit comments

Comments
 (0)