#NEWLINE# def _execute( self , command , params = None ) : #NEWLINE# #INDENT# 'Overriding in order to catch StaleElementReferenceException.' #NEWLINE# repeat = range ( 2 ) #NEWLINE# for i in repeat : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return super ( WebElementWrapper , self ) . _execute ( command , i ) #NEWLINE# #UNINDENT# except exceptions . StaleElementReferenceException : #NEWLINE# #INDENT# if ( i == repeat [ ( - 1 ) ] ) : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# if ( not self . _reload_element ( ) ) : #NEWLINE# #INDENT# raise