Soft assert for whether the text if visible in the current window/frame

        :params text: the string to search for
        :params msg: (Optional) msg explaining the difference
11426
def verify_text_present(self, text, msg=None):
        
        try:
            self.assert_text_present(text, msg)
        except AssertionError, e:
            if msg:
                m = "%s:\n%s" % (msg, str(e))
            else:
                m = str(e)
            self.verification_erorrs.append(m)
984860
def preview_text
      res = result
      [label, res.strip] unless res.nil? || res.empty?
    end
807126
def text(self,text):
        
        if text:
            text = utfstr(text)
            text = text.strip()
            text = re.sub('\s+',' ',text)
            if text:
                self.dirty = True
                self.escpos.text(text)
1365928
def text
      assert_exists

      # A little unintuitive - we'll return the 'label' or 'text' attribute if
      # they exist, otherwise the inner text of the element

      attribute = [:label, :text].find { |a| attribute? a }

      if attribute
        @element.get_attribute(attribute)
      else
        @element.text
      end
    end
795474
def debug(self, text):
		
		self.logger.debug("{}{}".format(self.message_prefix, text))
91502
def check(text):
    """"""
    err = "glaad.offensive_terms"
    msg = "Offensive term. Remove it or consider the context."

    list = [
        "fag",
        "faggot",
        "dyke",
        "sodomite",
        "homosexual agenda",
        "gay agenda",
        "transvestite",
        "homosexual lifestyle",
        "gay lifestyle"
        # homo - may create false positives without additional context
        # FIXME use topic detetor to decide whether "homo" is offensive
    ]

    return existence_check(text, list, err, msg, join=True, ignore_case=False)
934835
def debug_text_simple(self, text: str):
        
        self._debug_texts.append(self.to_debug_message(text))
808344
def _detect_xgettext(env):
    
    if 'XGETTEXT' in env:
        return env['XGETTEXT']
    xgettext = env.Detect('xgettext');
    if xgettext:
        return xgettext
    raise SCons.Errors.StopError(XgettextNotFound, "Could not detect xgettext")
    return None
686835
def text(self, prompt, default=None):
        """"""
        prompt = prompt if prompt is not None else 'Enter some text'
        prompt += " [{0}]: ".format(default) if default is not None else ': '
        return self.input(curry(filter_text, default=default), prompt)
1317
def is_alert_present(self):
        
        current_frame = None
        try:
            current_frame = self.driver.current_window_handle
            a = self.driver.switch_to_alert()
            a.text
        except NoAlertPresentException:
            # No alert
            return False
        except UnexpectedAlertPresentException:
            # Alert exists
            return True
        finally:
            if current_frame:
                self.driver.switch_to_window(current_frame)
        return True
323479
def p_text(self, text):
        ''''''
        item = text[1]
        text[0] = item if item[0] != "\n" else u""
        if len(text) > 2:
            text[0] += "\n"
32049
function( text ) {
			if(modules.utils.isString( text )){
				text = text.toLowerCase();
				if(modules.utils.startWith(text, 'p') ){
					return true;
				}
			}
			return false;
		}
964116
def contains_text(expected_text)
      assert_exists

      case expected_text
      when Regexp
        value() =~ expected_text
      when String
        value().index(expected_text)
      else
        raise TypeError, "expected String or Regexp, got #{expected_text.inspect}:#{expected_text.class}"
      end
    end
1055661
def delayed_assert_text(self, text, selector="html", by=By.CSS_SELECTOR,
                            timeout=settings.MINI_TIMEOUT):
        
        self.__delayed_assert_count += 1
        try:
            url = self.get_current_url()
            if url == self.__last_url_of_delayed_assert:
                timeout = 1
            else:
                self.__last_url_of_delayed_assert = url
        except Exception:
            pass
        try:
            self.wait_for_text_visible(text, selector, by=by, timeout=timeout)
            return True
        except Exception:
            self.__add_delayed_assert_failure()
            return False
328737
def verify_visible(self, locator, msg=None):
        
        try:
            self.assert_visible(locator, msg)
        except AssertionError, e:
            if msg:
                m = "%s:\n%s" % (msg, str(e))
            else:
                m = str(e)
            self.verification_erorrs.append(m)
610283
def confirm(text: str, default: bool = False) -> bool:
    """"""
    choices = "Y/n" if default else "y/N"
    prompt = f"{style(text, bold=True)} [{choices}]: "
    while 1:
        try:
            print(prompt, end="")
            value = input("").lower().strip()
        except (KeyboardInterrupt, EOFError):
            sys.exit(1)
        if value in ("y", "yes"):
            rv = True
        elif value in ("n", "no"):
            rv = False
        elif value == "":
            rv = default
        else:
            print_error("Error: invalid input")
            continue
        break
    return rv
15451
def assert_link_text(self, link_text, timeout=settings.SMALL_TIMEOUT):
        
        if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
            timeout = self.__get_new_timeout(timeout)
        self.wait_for_link_text_visible(link_text, timeout=timeout)
        if self.demo_mode:
            messenger_post = ("ASSERT LINK TEXT {%s}." % link_text)
            self.__highlight_with_assert_success(
                messenger_post, link_text, by=By.LINK_TEXT)
        return True