code: def __select_option(self, dropdown_selector, option,
                          dropdown_by=By.CSS_SELECTOR, option_by="text",
                          timeout=settings.SMALL_TIMEOUT):
          
          if page_utils.is_xpath_selector(dropdown_selector):
              dropdown_by = By.XPATH
          element = self.find_element(
              dropdown_selector, by=dropdown_by, timeout=timeout)
          self.__demo_mode_highlight_if_active(dropdown_selector, dropdown_by)
          pre_action_url = self.driver.current_url
          try:
              if option_by == "index":
                  Select(element).select_by_index(option)
              elif option_by == "value":
                  Select(element).select_by_value(option)
              else:
                  Select(element).select_by_visible_text(option)
          except (StaleElementReferenceException, ENI_Exception):
              self.wait_for_ready_state_complete()
              time.sleep(0.05)
              element = self.find_element(
                  dropdown_selector, by=dropdown_by, timeout=timeout)
              if option_by == "index":
                  Select(element).select_by_index(option)
              elif option_by == "value":
                  Select(element).select_by_value(option)
              else:
                  Select(element).select_by_visible_text(option)
          if settings.WAIT_FOR_RSC_ON_CLICKS:
              self.wait_for_ready_state_complete()
          if self.demo_mode:
              if self.driver.current_url != pre_action_url:
                  self.__demo_mode_pause_if_active()
              else:
                  self.__demo_mode_pause_if_active(tiny=True)
docs: Selects an HTML <select> option by specification.
              Option specifications are by "text", "index", or "value".
              Defaults to "text" if option_by is unspecified or unknown.