def selenium_execute_with_retry(self, execute, command, params):
        """Run a single selenium command and retry once.

        The retry happens for certain errors that are likely to be resolved
        by retrying.
        """
        try:
            return execute(command, params)
        except Exception as e:
            if isinstance(e, ALWAYS_RETRY_EXCEPTIONS) or (
                isinstance(e, WebDriverException)
                and "Other element would receive the click" in str(e)
            ):
                # Retry
                self.builtin.log("Retrying {} command".format(command), level="WARN")
                time.sleep(2)
                return execute(command, params)
            else:
                raise
def selenium_execute_with_retry ( self , execute , command , params ) : try : return execute ( command , params ) except Exception as e : if isinstance ( e , ALWAYS_RETRY_EXCEPTIONS ) or ( isinstance ( e , WebDriverException ) and "Other element would receive the click" in str ( e ) ) : self . builtin . log ( "Retrying {} command" . format ( command ) , level = "WARN" ) time . sleep ( 2 ) return execute ( command , params ) else : raise
Run a single selenium command and retry once.

        The retry happens for certain errors that are likely to be resolved
        by retrying.