@@ -499,6 +499,20 @@ def add_text(self, selector, new_value, by=By.CSS_SELECTOR,
499
499
element .send_keys (Keys .RETURN )
500
500
if settings .WAIT_FOR_RSC_ON_PAGE_LOADS :
501
501
self .wait_for_ready_state_complete ()
502
+ except Exception :
503
+ exc_message = self ._get_exception_message ()
504
+ update = ("Your version of ChromeDriver may be out-of-date! "
505
+ "Please go to "
506
+ "https://sites.google.com/a/chromium.org/chromedriver/ "
507
+ "and download the latest version to your system PATH! "
508
+ "Original Exception Message: %s" % exc_message )
509
+ using_old_chromedriver = False
510
+ if "unknown error: call function result missing" in exc_message :
511
+ using_old_chromedriver = True
512
+ if self .browser == 'chrome' and using_old_chromedriver :
513
+ raise Exception (update )
514
+ else :
515
+ raise Exception (exc_message )
502
516
if self .demo_mode :
503
517
if self .driver .current_url != pre_action_url :
504
518
self ._demo_mode_pause_if_active ()
@@ -541,6 +555,8 @@ def update_text_value(self, selector, new_value, by=By.CSS_SELECTOR,
541
555
element = self .wait_for_element_visible (
542
556
selector , by = by , timeout = timeout )
543
557
element .clear ()
558
+ except Exception :
559
+ pass # Clearing the text field first isn't critical
544
560
self ._demo_mode_pause_if_active (tiny = True )
545
561
pre_action_url = self .driver .current_url
546
562
try :
0 commit comments