def get(self, timeout=None, raise_error=True):
start_time = time.time()<EOL>if timeout is None:<EOL><INDENT>timeout = self.timeout<EOL><DEDENT>while True:<EOL><INDENT>elems = self.find_elements()<EOL>if len(elems) > <NUM_LIT:0>:<EOL><INDENT>return elems[<NUM_LIT:0>]<EOL><DEDENT>if start_time + timeout < time.time():<EOL><INDENT>break<EOL><DEDENT>time.sleep(<NUM_LIT>)<EOL><DEDENT>if self.session.alert.exists and self.http.alert_callback:<EOL><INDENT>self.http.alert_callback()<EOL>return self.get(timeout, raise_error)<EOL><DEDENT>if raise_error:<EOL><INDENT>raise WDAElementNotFoundError("<STR_LIT>")<EOL><DEDENT>
Args:
    timeout (float): timeout for query element, unit seconds
        Default 10s
    raise_error (bool): whether to raise error if element not found

Returns:
    Element: UI Element

Raises:
    WDAElementNotFoundError if raise_error is True else None