blob: 863f83b6ff63fae38cc00f049536949a064c7a26 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>selenium.webdriver.support.expected_conditions &mdash; Selenium 2.0 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="Selenium 2.0 documentation" href="../index.html" />
<link rel="up" title="Selenium Documentation" href="../api.html" />
<link rel="next" title="selenium.webdriver.support.select" href="selenium.webdriver.support.select.html" />
<link rel="prev" title="selenium.webdriver.support.event_firing_webdriver" href="selenium.webdriver.support.event_firing_webdriver.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="selenium.webdriver.support.select.html" title="selenium.webdriver.support.select"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="selenium.webdriver.support.event_firing_webdriver.html" title="selenium.webdriver.support.event_firing_webdriver"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">Selenium 2.0 documentation</a> &raquo;</li>
<li><a href="../api.html" accesskey="U">Selenium Documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-selenium.webdriver.support.expected_conditions">
<span id="selenium-webdriver-support-expected-conditions"></span><h1>selenium.webdriver.support.expected_conditions<a class="headerlink" href="#module-selenium.webdriver.support.expected_conditions" title="Permalink to this headline"></a></h1>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.alert_is_present">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">alert_is_present</tt><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#alert_is_present"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.alert_is_present" title="Permalink to this definition"></a></dt>
<dd><p>Expect an alert to be present.</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.element_located_selection_state_to_be">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">element_located_selection_state_to_be</tt><big>(</big><em>locator</em>, <em>is_selected</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#element_located_selection_state_to_be"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.element_located_selection_state_to_be" title="Permalink to this definition"></a></dt>
<dd><p>An expectation to locate an element and check if the selection state
specified is in that state.
locator is a tuple of (by, path)
is_selected is a boolean</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.element_located_to_be_selected">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">element_located_to_be_selected</tt><big>(</big><em>locator</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#element_located_to_be_selected"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.element_located_to_be_selected" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for the element to be located is selected.
locator is a tuple of (by, path)</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.element_selection_state_to_be">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">element_selection_state_to_be</tt><big>(</big><em>element</em>, <em>is_selected</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#element_selection_state_to_be"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.element_selection_state_to_be" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking if the given element is selected.
element is WebElement object
is_selected is a Boolean.&#8221;</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.element_to_be_clickable">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">element_to_be_clickable</tt><big>(</big><em>locator</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#element_to_be_clickable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.element_to_be_clickable" title="Permalink to this definition"></a></dt>
<dd><p>An Expectation for checking an element is visible and enabled such that
you can click it.</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.element_to_be_selected">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">element_to_be_selected</tt><big>(</big><em>element</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#element_to_be_selected"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.element_to_be_selected" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking the selection is selected.
element is WebElement object</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.frame_to_be_available_and_switch_to_it">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">frame_to_be_available_and_switch_to_it</tt><big>(</big><em>locator</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#frame_to_be_available_and_switch_to_it"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.frame_to_be_available_and_switch_to_it" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking whether the given frame is available to
switch to. If the frame is available it switches the given driver to the
specified frame.</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.invisibility_of_element_located">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">invisibility_of_element_located</tt><big>(</big><em>locator</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#invisibility_of_element_located"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.invisibility_of_element_located" title="Permalink to this definition"></a></dt>
<dd><p>An Expectation for checking that an element is either invisible or not
present on the DOM.</p>
<p>locator used to find the element</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.presence_of_all_elements_located">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">presence_of_all_elements_located</tt><big>(</big><em>locator</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#presence_of_all_elements_located"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.presence_of_all_elements_located" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking that there is at least one element present
on a web page.
locator is used to find the element
returns the list of WebElements once they are located</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.presence_of_element_located">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">presence_of_element_located</tt><big>(</big><em>locator</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#presence_of_element_located"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.presence_of_element_located" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking that an element is present on the DOM
of a page. This does not necessarily mean that the element is visible.
locator - used to find the element
returns the WebElement once it is located</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.staleness_of">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">staleness_of</tt><big>(</big><em>element</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#staleness_of"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.staleness_of" title="Permalink to this definition"></a></dt>
<dd><p>Wait until an element is no longer attached to the DOM.
element is the element to wait for.
returns False if the element is still attached to the DOM, true otherwise.</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.text_to_be_present_in_element">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">text_to_be_present_in_element</tt><big>(</big><em>locator</em>, <em>text_</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#text_to_be_present_in_element"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.text_to_be_present_in_element" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking if the given text is present in the
specified element.
locator, text</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.text_to_be_present_in_element_value">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">text_to_be_present_in_element_value</tt><big>(</big><em>locator</em>, <em>text_</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#text_to_be_present_in_element_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.text_to_be_present_in_element_value" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking if the given text is present in the element&#8217;s
locator, text</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.title_contains">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">title_contains</tt><big>(</big><em>title</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#title_contains"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.title_contains" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking that the title contains a case-sensitive
substring. title is the fragment of title expected
returns True when the title matches, False otherwise</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.title_is">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">title_is</tt><big>(</big><em>title</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#title_is"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.title_is" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking the title of a page.
title is the expected title, which must be an exact match
returns True if the title matches, false otherwise.</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.visibility_of">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">visibility_of</tt><big>(</big><em>element</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#visibility_of"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.visibility_of" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking that an element, known to be present on the
DOM of a page, is visible. Visibility means that the element is not only
displayed but also has a height and width that is greater than 0.
element is the WebElement
returns the (same) WebElement once it is visible</p>
</dd></dl>
<dl class="class">
<dt id="selenium.webdriver.support.expected_conditions.visibility_of_element_located">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.support.expected_conditions.</tt><tt class="descname">visibility_of_element_located</tt><big>(</big><em>locator</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/support/expected_conditions.html#visibility_of_element_located"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.support.expected_conditions.visibility_of_element_located" title="Permalink to this definition"></a></dt>
<dd><p>An expectation for checking that an element is present on the DOM of a
page and visible. Visibility means that the element is not only displayed
but also has a height and width that is greater than 0.
locator - used to find the element
returns the WebElement once it is located and visible</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="selenium.webdriver.support.event_firing_webdriver.html"
title="previous chapter">selenium.webdriver.support.event_firing_webdriver</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="selenium.webdriver.support.select.html"
title="next chapter">selenium.webdriver.support.select</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/webdriver_support/selenium.webdriver.support.expected_conditions.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="selenium.webdriver.support.select.html" title="selenium.webdriver.support.select"
>next</a> |</li>
<li class="right" >
<a href="selenium.webdriver.support.event_firing_webdriver.html" title="selenium.webdriver.support.event_firing_webdriver"
>previous</a> |</li>
<li><a href="../index.html">Selenium 2.0 documentation</a> &raquo;</li>
<li><a href="../api.html" >Selenium Documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011, plightbo, simon.m.stewart, hbchai, jrhuggins, et al..
</div>
</body>
</html>