def update_text_value(self, selector, new_value, by=By.CSS_SELECTOR,<EOL>timeout=settings.LARGE_TIMEOUT, retry=False):
if self.timeout_multiplier and timeout == settings.LARGE_TIMEOUT:<EOL><INDENT>timeout = self.__get_new_timeout(timeout)<EOL><DEDENT>if page_utils.is_xpath_selector(selector):<EOL><INDENT>by = By.XPATH<EOL><DEDENT>element = self.wait_for_element_visible(<EOL>selector, by=by, timeout=timeout)<EOL>self.__demo_mode_highlight_if_active(selector, by)<EOL>if not self.demo_mode:<EOL><INDENT>self.__scroll_to_element(element)<EOL><DEDENT>try:<EOL><INDENT>element.clear()<EOL><DEDENT>except (StaleElementReferenceException, ENI_Exception):<EOL><INDENT>self.wait_for_ready_state_complete()<EOL>time.sleep(<NUM_LIT>)<EOL>element = self.wait_for_element_visible(<EOL>selector, by=by, timeout=timeout)<EOL>element.clear()<EOL><DEDENT>except Exception:<EOL><INDENT>pass  <EOL><DEDENT>self.__demo_mode_pause_if_active(tiny=True)<EOL>pre_action_url = self.driver.current_url<EOL>try:<EOL><INDENT>if not new_value.endswith('<STR_LIT:\n>'):<EOL><INDENT>element.send_keys(new_value)<EOL>if settings.WAIT_FOR_RSC_ON_PAGE_LOADS:<EOL><INDENT>self.wait_for_ready_state_complete()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>new_value = new_value[:-<NUM_LIT:1>]<EOL>element.send_keys(new_value)<EOL>element.send_keys(Keys.RETURN)<EOL>if settings.WAIT_FOR_RSC_ON_PAGE_LOADS:<EOL><INDENT>self.wait_for_ready_state_complete()<EOL><DEDENT><DEDENT><DEDENT>except (StaleElementReferenceException, ENI_Exception):<EOL><INDENT>self.wait_for_ready_state_complete()<EOL>time.sleep(<NUM_LIT>)<EOL>element = self.wait_for_element_visible(<EOL>selector, by=by, timeout=timeout)<EOL>element.clear()<EOL>if not new_value.endswith('<STR_LIT:\n>'):<EOL><INDENT>element.send_keys(new_value)<EOL><DEDENT>else:<EOL><INDENT>new_value = new_value[:-<NUM_LIT:1>]<EOL>element.send_keys(new_value)<EOL>element.send_keys(Keys.RETURN)<EOL>if settings.WAIT_FOR_RSC_ON_PAGE_LOADS:<EOL><INDENT>self.wait_for_ready_state_complete()<EOL><DEDENT><DEDENT><DEDENT>except Exception:<EOL><INDENT>exc_message = self.__get_improved_exception_message()<EOL>raise Exception(exc_message)<EOL><DEDENT>if (retry and element.get_attribute('<STR_LIT:value>') != new_value and (<EOL>not new_value.endswith('<STR_LIT:\n>'))):<EOL><INDENT>logging.debug('<STR_LIT>')<EOL>self.set_value(selector, new_value, by=by)<EOL><DEDENT>if self.demo_mode:<EOL><INDENT>if self.driver.current_url != pre_action_url:<EOL><INDENT>self.__demo_mode_pause_if_active()<EOL><DEDENT>else:<EOL><INDENT>self.__demo_mode_pause_if_active(tiny=True)<EOL><DEDENT><DEDENT>
This method updates an element's text value with a new value.
            @Params
            selector - the selector with the value to update
            new_value - the new value for setting the text field
            by - the type of selector to search by (Default: CSS)
            timeout - how long to wait for the selector to be visible
            retry - if True, use JS if the selenium text update fails