You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Robot_Old/pywinauto.findwindows — pyw...

410 lines
17 KiB

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pywinauto.findwindows &mdash; pywinauto 0.6.6 documentation</title>
<script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'0.6.6',
LANGUAGE:'en',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: ''
};
</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>
<script type="text/javascript" src="https://assets.readthedocs.org/static/javascript/readthedocs-doc-embed.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="next" title="pywinauto.timings" href="pywinauto.timings.html" />
<link rel="prev" title="pywinauto.findbestmatch" href="pywinauto.findbestmatch.html" />
<!-- RTD Extra Head -->
<!--
Always link to the latest version, as canonical.
http://docs.readthedocs.org/en/latest/canonical.html
-->
<link rel="canonical" href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.findwindows.html" />
<link rel="stylesheet" href="https://assets.readthedocs.org/static/css/readthedocs-doc-embed.css" type="text/css" />
<script type="text/javascript" src="../_static/readthedocs-data.js"></script>
<!-- Add page-specific data, which must exist in the page js, not global -->
<script type="text/javascript">
READTHEDOCS_DATA['page'] = 'code/pywinauto.findwindows'
READTHEDOCS_DATA['source_suffix'] = '.txt'
</script>
<script type="text/javascript" src="https://assets.readthedocs.org/static/javascript/readthedocs-analytics.js"></script>
<!-- end RTD <extrahead> -->
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../contents.html" class="icon icon-home"> pywinauto
</a>
<div class="version">
latest
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">What is pywinauto</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../HowTo.html">How To&#8217;s</a></li>
<li class="toctree-l1"><a class="reference internal" href="../wait_long_operations.html">Waiting for Long Operations</a></li>
<li class="toctree-l1"><a class="reference internal" href="../remote_execution.html">Remote Execution Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../controls_overview.html">Methods available to each different control type</a></li>
<li class="toctree-l1"><a class="reference internal" href="../credits.html">Credits</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev_notes.html">Dev Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../TODO.html">PYWINAUTO TODO&#8217;s</a></li>
<li class="toctree-l1"><a class="reference internal" href="../HISTORY.html">Change Log</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="code.html">Basic User Input Modules</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="code.html#main-user-modules">Main User Modules</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="pywinauto.application.html">pywinauto.application module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pywinauto.findbestmatch.html">pywinauto.findbestmatch</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">pywinauto.findwindows</a></li>
<li class="toctree-l2"><a class="reference internal" href="pywinauto.timings.html">pywinauto.timings</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="code.html#specific-functionality">Specific Functionality</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html#controls-reference">Controls Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html#pre-supplied-tests">Pre-supplied Tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html#backend-internal-implementation-modules">Backend Internal Implementation modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html#internal-modules">Internal Modules</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../contents.html">pywinauto</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../contents.html">Docs</a> &raquo;</li>
<li><a href="code.html">Basic User Input Modules</a> &raquo;</li>
<li>pywinauto.findwindows</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/pywinauto/pywinauto/blob/master/docs/code/pywinauto.findwindows.txt" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="pywinauto-findwindows">
<h1>pywinauto.findwindows<a class="headerlink" href="#pywinauto-findwindows" title="Permalink to this headline"></a></h1>
<blockquote>
<div><span class="target" id="module-pywinauto.findwindows"></span><p>Provides functions for iterating and finding windows/elements</p>
<dl class="exception">
<dt id="pywinauto.findwindows.ElementAmbiguousError">
<em class="property">exception </em><code class="descclassname">pywinauto.findwindows.</code><code class="descname">ElementAmbiguousError</code><a class="headerlink" href="#pywinauto.findwindows.ElementAmbiguousError" title="Permalink to this definition"></a></dt>
<dd><p>There was more then one element that matched</p>
</dd></dl>
<dl class="exception">
<dt id="pywinauto.findwindows.ElementNotFoundError">
<em class="property">exception </em><code class="descclassname">pywinauto.findwindows.</code><code class="descname">ElementNotFoundError</code><a class="headerlink" href="#pywinauto.findwindows.ElementNotFoundError" title="Permalink to this definition"></a></dt>
<dd><p>No element could be found</p>
</dd></dl>
<dl class="exception">
<dt id="pywinauto.findwindows.WindowAmbiguousError">
<em class="property">exception </em><code class="descclassname">pywinauto.findwindows.</code><code class="descname">WindowAmbiguousError</code><a class="headerlink" href="#pywinauto.findwindows.WindowAmbiguousError" title="Permalink to this definition"></a></dt>
<dd><p>There was more then one window that matched</p>
</dd></dl>
<dl class="exception">
<dt id="pywinauto.findwindows.WindowNotFoundError">
<em class="property">exception </em><code class="descclassname">pywinauto.findwindows.</code><code class="descname">WindowNotFoundError</code><a class="headerlink" href="#pywinauto.findwindows.WindowNotFoundError" title="Permalink to this definition"></a></dt>
<dd><p>No window could be found</p>
</dd></dl>
<dl class="function">
<dt id="pywinauto.findwindows.enum_windows">
<code class="descclassname">pywinauto.findwindows.</code><code class="descname">enum_windows</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pywinauto.findwindows.enum_windows" title="Permalink to this definition"></a></dt>
<dd><p>Return a list of handles of all the top level windows</p>
</dd></dl>
<dl class="function">
<dt id="pywinauto.findwindows.find_element">
<code class="descclassname">pywinauto.findwindows.</code><code class="descname">find_element</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pywinauto.findwindows.find_element" title="Permalink to this definition"></a></dt>
<dd><p>Call find_elements and ensure that only one element is returned</p>
<p>Calls find_elements with exactly the same arguments as it is called with
so please see <a class="reference internal" href="#pywinauto.findwindows.find_elements" title="pywinauto.findwindows.find_elements"><code class="xref py py-func docutils literal"><span class="pre">find_elements()</span></code></a> for the full parameters description.</p>
</dd></dl>
<dl class="function">
<dt id="pywinauto.findwindows.find_elements">
<code class="descclassname">pywinauto.findwindows.</code><code class="descname">find_elements</code><span class="sig-paren">(</span><em>class_name=None</em>, <em>class_name_re=None</em>, <em>parent=None</em>, <em>process=None</em>, <em>title=None</em>, <em>title_re=None</em>, <em>top_level_only=True</em>, <em>visible_only=True</em>, <em>enabled_only=False</em>, <em>best_match=None</em>, <em>handle=None</em>, <em>ctrl_index=None</em>, <em>found_index=None</em>, <em>predicate_func=None</em>, <em>active_only=False</em>, <em>control_id=None</em>, <em>control_type=None</em>, <em>auto_id=None</em>, <em>framework_id=None</em>, <em>backend=None</em>, <em>depth=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pywinauto.findwindows.find_elements" title="Permalink to this definition"></a></dt>
<dd><p>Find elements based on criteria passed in</p>
<p>WARNING! Direct usage of this function is not recommended! It&#8217;s a very low level API.
Better use Application and WindowSpecification objects described in the
Getting Started Guide.</p>
<p>Possible values are:</p>
<ul class="simple">
<li><strong>class_name</strong> Elements with this window class</li>
<li><strong>class_name_re</strong> Elements whose class matches this regular expression</li>
<li><strong>parent</strong> Elements that are children of this</li>
<li><strong>process</strong> Elements running in this process</li>
<li><strong>title</strong> Elements with this text</li>
<li><strong>title_re</strong> Elements whose text matches this regular expression</li>
<li><strong>top_level_only</strong> Top level elements only (default=**True**)</li>
<li><strong>visible_only</strong> Visible elements only (default=**True**)</li>
<li><strong>enabled_only</strong> Enabled elements only (default=False)</li>
<li><strong>best_match</strong> Elements with a title similar to this</li>
<li><strong>handle</strong> The handle of the element to return</li>
<li><strong>ctrl_index</strong> The index of the child element to return</li>
<li><strong>found_index</strong> The index of the filtered out child element to return</li>
<li><strong>predicate_func</strong> A user provided hook for a custom element validation</li>
<li><strong>active_only</strong> Active elements only (default=False)</li>
<li><strong>control_id</strong> Elements with this control id</li>
<li><strong>control_type</strong> Elements with this control type (string; for UIAutomation elements)</li>
<li><strong>auto_id</strong> Elements with this automation id (for UIAutomation elements)</li>
<li><strong>framework_id</strong> Elements with this framework id (for UIAutomation elements)</li>
<li><strong>backend</strong> Back-end name to use while searching (default=None means current active backend)</li>
</ul>
</dd></dl>
<dl class="function">
<dt id="pywinauto.findwindows.find_window">
<code class="descclassname">pywinauto.findwindows.</code><code class="descname">find_window</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pywinauto.findwindows.find_window" title="Permalink to this definition"></a></dt>
<dd><p>Call find_elements and ensure that only handle of one element is returned</p>
<p>Calls find_elements with exactly the same arguments as it is called with
so please see <a class="reference internal" href="#pywinauto.findwindows.find_elements" title="pywinauto.findwindows.find_elements"><code class="xref py py-func docutils literal"><span class="pre">find_elements()</span></code></a> for the full parameters description.</p>
</dd></dl>
<dl class="function">
<dt id="pywinauto.findwindows.find_windows">
<code class="descclassname">pywinauto.findwindows.</code><code class="descname">find_windows</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pywinauto.findwindows.find_windows" title="Permalink to this definition"></a></dt>
<dd><p>Find elements based on criteria passed in and return list of their handles</p>
<p>Calls find_elements with exactly the same arguments as it is called with
so please see <a class="reference internal" href="#pywinauto.findwindows.find_elements" title="pywinauto.findwindows.find_elements"><code class="xref py py-func docutils literal"><span class="pre">find_elements()</span></code></a> for the full parameters description.</p>
</dd></dl>
</div></blockquote>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="pywinauto.timings.html" class="btn btn-neutral float-right" title="pywinauto.timings" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="pywinauto.findbestmatch.html" class="btn btn-neutral float-left" title="pywinauto.findbestmatch" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2018, Mark Mc Mahon and Contributors
<span class="commit">
Revision <code>7c93b2dd</code>.
</span>
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Read the Docs</span>
v: latest
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>Versions</dt>
<dd><a href="/en/latest/">latest</a></dd>
<dd><a href="/en/stable/">stable</a></dd>
<dd><a href="/en/0.6.5/">0.6.5</a></dd>
<dd><a href="/en/0.6.4/">0.6.4</a></dd>
<dd><a href="/en/0.6.3/">0.6.3</a></dd>
<dd><a href="/en/0.6.2/">0.6.2</a></dd>
<dd><a href="/en/0.6.1/">0.6.1</a></dd>
<dd><a href="/en/0.6.0/">0.6.0</a></dd>
<dd><a href="/en/uia/">uia</a></dd>
</dl>
<dl>
<dt>Downloads</dt>
<dd><a href="//readthedocs.org/projects/pywinauto/downloads/pdf/latest/">pdf</a></dd>
<dd><a href="//readthedocs.org/projects/pywinauto/downloads/htmlzip/latest/">htmlzip</a></dd>
</dl>
<dl>
<dt>On Read the Docs</dt>
<dd>
<a href="//readthedocs.org/projects/pywinauto/?fromdocs=pywinauto">Project Home</a>
</dd>
<dd>
<a href="//readthedocs.org/builds/pywinauto/?fromdocs=pywinauto">Builds</a>
</dd>
</dl>
<hr/>
Free document hosting provided by <a href="http://www.readthedocs.org">Read the Docs</a>.
</div>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>