rb/lib/selenium/client/extensions.rb
def wait_for_text(pattern, options={})
        builder = JavascriptExpressionBuilder.new
		    builder.find_text(pattern, options).append("text_match == true;")
        wait_for_condition builder.script, options[:timeout_in_seconds]
      end
# Wait for some text to be present (the wait is happening browser side).
#
# wait_for_text will search for the given argument within the innerHTML
# of the current DOM. Note that this method treats a single string
# as a special case.
#
# ==== Parameters
# wait_for_text accepts an optional hash of parameters:
# * <tt>:element</tt> - a selenium locator for an element limiting
#   the search scope.
# * <tt>:timeout_in_seconds</tt> - duration in seconds after  which we
#   time out if text cannot be found.
#
# ==== Regular Expressions
# In addition to plain strings, wait_for_text accepts regular expressions
# as the pattern specification.
#
# ==== Examples
# The following are equivalent, and will match "some text" anywhere
# within the document:
#   wait_for_text "some text"
#   wait_for_text /some text/
#
# This will match "some text" anywhere within the specified element:
#   wait_for_text /some text/, :element => "container"
#
# This will match "some text" only if it exactly matches the complete
# innerHTML of the specified element:
#   wait_for_text "some text", :element => "container"
#
Wait for some text to be present (the wait is happening browser side).
wait_for_text will search for the given argument within the innerHTML
of the current DOM. Note that this method treats a single string
as a special case.

Parameters
wait_for_text accepts an optional hash of parameters:
:element - a selenium locator for an element limiting
the search scope.
:timeout_in_seconds - duration in seconds after  which we
time out if text cannot be found.

Regular Expressions
In addition to plain strings, wait_for_text accepts regular expressions
as the pattern specification.

Examples
The following are equivalent, and will match "some text" anywhere
within the document:
wait_for_text "some text"
wait_for_text /some text

This will match "some text" anywhere within the specified element:
wait_for_text /some text/, :element => "container"


Wait for some text to be present ( the wait is happening browser side ) . wait_for_text will search for the given argument within the innerHTML of the current DOM . Note that this method treats a single string as a special case . Parameters wait_for_text accepts an optional hash of parameters : : element - a selenium locator for an element limiting the search scope . : timeout_in_seconds - duration in seconds after which we time out if text cannot be found . Regular Expressions In addition to plain strings wait_for_text accepts regular expressions as the pattern specification . Examples The following are equivalent and will match " some text " anywhere within the document : wait_for_text " some text " wait_for_text / some text This will match " some text " anywhere within the specified element : wait_for_text / some text / : element = > " container "
def wait_for_text(pattern, options={})
        builder = JavascriptExpressionBuilder.new
		    builder.find_text(pattern, options).append("text_match == true;")
        wait_for_condition builder.script, options[:timeout_in_seconds]
      end
def wait_for_text ( pattern , options = { } ) builder = JavascriptExpressionBuilder . new builder . find_text ( pattern , options ) . append ( "text_match == true;" ) wait_for_condition builder . script , options [ :timeout_in_seconds ] end
Wait for some text to be present (the wait is happening browser side).
Wait for some text to be present ( the wait is happening browser side ) .
pattern
options