Skip to content

Commit a4a3b73

Browse files
committed
Remove out-of-date code
1 parent e38c608 commit a4a3b73

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,6 @@ def update_text(
514514
element.send_keys(Keys.RETURN)
515515
if settings.WAIT_FOR_RSC_ON_PAGE_LOADS:
516516
self.wait_for_ready_state_complete()
517-
except Exception:
518-
exc_message = self.__get_improved_exception_message()
519-
raise Exception(exc_message)
520517
if (
521518
retry
522519
and element.get_attribute("value") != text
@@ -574,9 +571,6 @@ def add_text(self, selector, text, by=By.CSS_SELECTOR, timeout=None):
574571
element.send_keys(Keys.RETURN)
575572
if settings.WAIT_FOR_RSC_ON_PAGE_LOADS:
576573
self.wait_for_ready_state_complete()
577-
except Exception:
578-
exc_message = self.__get_improved_exception_message()
579-
raise Exception(exc_message)
580574
if self.demo_mode:
581575
if self.driver.current_url != pre_action_url:
582576
self.__demo_mode_pause_if_active()
@@ -4561,9 +4555,6 @@ def choose_file(
45614555
selector, by=by, timeout=timeout
45624556
)
45634557
element.send_keys(abs_path)
4564-
except Exception:
4565-
exc_message = self.__get_improved_exception_message()
4566-
raise Exception(exc_message)
45674558
if self.demo_mode:
45684559
if self.driver.current_url != pre_action_url:
45694560
self.__demo_mode_pause_if_active()
@@ -9535,30 +9526,6 @@ def __get_exception_message(self):
95359526
exc_message = sys.exc_info()
95369527
return exc_message
95379528

9538-
def __get_improved_exception_message(self):
9539-
"""If Chromedriver is out-of-date, make it clear!
9540-
Given the high popularity of the following StackOverflow article:
9541-
https://stackoverflow.com/questions/49162667/unknown-error-
9542-
call-function-result-missing-value-for-selenium-send-keys-even
9543-
... the original error message was not helpful. Tell people directly.
9544-
(Only expected when using driver.send_keys() with an old Chromedriver.)
9545-
"""
9546-
exc_message = self.__get_exception_message()
9547-
maybe_using_old_chromedriver = False
9548-
if "unknown error: call function result missing" in exc_message:
9549-
maybe_using_old_chromedriver = True
9550-
if self.browser == "chrome" and maybe_using_old_chromedriver:
9551-
update = (
9552-
"Your version of ChromeDriver may be out-of-date! "
9553-
"Please go to "
9554-
"https://sites.google.com/a/chromium.org/chromedriver/ "
9555-
"and download the latest version to your system PATH! "
9556-
"Or use: ``seleniumbase install chromedriver`` . "
9557-
"Original Exception Message: %s" % exc_message
9558-
)
9559-
exc_message = update
9560-
return exc_message
9561-
95629529
def __add_deferred_assert_failure(self):
95639530
""" Add a deferred_assert failure to a list for future processing. """
95649531
self.__check_scope()

0 commit comments

Comments
 (0)