Checks if a text exists in the source of an already loaded URL.

@param text
770087
@Then("^this text exists '(.+?)'$")
    public void assertSeleniumTextInSource(String text) {
        assertThat(this.commonspec, commonspec.getDriver()).as("Expected text not found at page").contains(text);
    }
23698
function(text) {
			var result = text;
			try {
				switch (this._headers.Accept) {
					case "application/json":
						result = JSON.parse(text);
						break;
					case "text/xml":
						result = new DOMParser().parseFromString(text, "text/xml");
						break;
				}
			} catch (exception) {
				if (gui.debug) {
					console.error(
						this._headers.Accept + " dysfunction at " + this._url
					);
				}
			}
			return result;
		}
322895
def is_url(text):
    
    if text is None:
        return False
    text = text.lower()
    return text.startswith('http://') or text.startswith('https://') or \
        text.startswith('urn:') or text.startswith('file://')
424399
public static boolean streamHasText(InputStream in, String text) {
    final byte[] readBuffer = new byte[8192];

    StringBuffer sb = new StringBuffer();
    try {
      if (in.available() > 0) {
        int bytesRead = 0;
        while ((bytesRead = in.read(readBuffer)) != -1) {
          sb.append(new String(readBuffer, 0, bytesRead));

          if (sb.toString().contains(text)) {
            sb = null;
            return true;
          }
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      try {
        in.close();
      } catch (IOException e) {
        e.printStackTrace();
      }
    }

    return false;
  }
463087
public void setAdditionalText(String text) {

        if (CmsStringUtil.isEmpty(text)) {
            m_additionalText.setVisible(false);
        } else {
            m_additionalText.setValue(text);
            m_additionalText.setVisible(true);
        }
    }
896346
private static String decode(final String text)
        throws UnsupportedEncodingException {
        try {
            return URLDecoder.decode(text, Charset.defaultCharset().name());
        } catch (final IllegalArgumentException ex) {
            throw new DecodingException(ex);
        }
    }
283789
public void setText(String text) {
        span.setText(text);

        if (!span.isAttached()) {
            add(span);
        }
    }
860799
public boolean textPresentInSource(String expectedText) {
        try {
            return driver.getPageSource().contains(expectedText);
        } catch (Exception e) {
            log.info(e);
            return false;
        }
    }
473119
public boolean append(String text) {
        if (get() == null) return set(new StringBuilder(text));
        get().append(text);
        return true;
    }
1029682
public void setText(String text) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
      if ((text == null) || text.length() < 257) {
        SibTr.entry(this, tc, "setText", text);
      }
      else {
        SibTr.entry(this, tc, "setText", new Object[]{text.length(), text.substring(0,200)+"..."});
      }
    }

    // If the payload is changing, we need to clear all the cached values.
    softRefToDocument = null;
    clearCachedLengths();

    // Set the payload data
    getPayload().setField(JmsTextBodyAccess.BODY_DATA_VALUE, text);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setText");
  }
772573
public static boolean isRedirect(String text) {
		boolean result = false;
		String pattern;
		for (int i = 0; i < redirectPatterns.size() && !result; i++) {
			pattern = redirectPatterns.get(i);
			result = text.regionMatches(true, 0, pattern, 0, pattern.length());
		}
		return result;

	}
768699
public boolean hasKeyword(String text)
    {
        checkForConstructedFailureStates();

        State currentState = this.rootState;
        for (int i = 0; i < text.length(); ++i)
        {
        	State nextState = getState(currentState, text.charAt(i));
            if (nextState != null && nextState != currentState && nextState.emit().size() != 0) {
                return true;
            }
            currentState = nextState;
        }
        return false;
    }
239602
public static String urlDecode(String text)
    {
        String urlEncodedString=text;
        if(text!=null)
        {
            try
            {
                urlEncodedString=URLDecoder.decode(text,SpiUtil.UTF_8_ENCODING_NAME);
            }
            catch(UnsupportedEncodingException exception)
            {
                throw new FaxException("Error while URL decoding text.",exception);
            }
        }
        
        return urlEncodedString;
    }
355949
public Template loadInline(String text) throws IOException, ParseException {
    
		try(InlineTemplateSource templateSource = new InlineTemplateSource(text)) {
		
			return load("inline", templateSource);
		}
		
  }
54394
def check(text):
    """"""
    err = "misc.suddenly"
    msg = u"Suddenly is nondescript, slows the action, and warns your reader."
    regex = "Suddenly,"

    return existence_check(text, [regex], err, msg, max_errors=3,
                           require_padding=False, offset=-1, ignore_case=False)
699185
public void assertText(final By by, final String text) {
		WebElement element = driver.findElement(by);

		Assert.assertEquals("Element: " + element
				+ " does NOT contain the given text: " + text, text,
				element.getText());
	}
346833
public final void setPlaceholder(String text) {
        if (!text.equalsIgnoreCase(mText)) {
            setPlaceholderTextInternal(text, mTextColor, mTextSize, true);
        }
    }