<liclass="toctree-l2"><aclass="reference internal"href="#theory-practice-web-app-ui-access-selenium">Theory & practice. WEB app UI access (selenium)</a><ul>
<liclass="toctree-l3"><aclass="reference internal"href="#id19">How to use</a></li>
</ul>
</li>
<liclass="toctree-l2"><aclass="reference internal"href="#theory-practice-keyboard-mouse-manipulation">Theory & practice. Keyboard & mouse manipulation</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="#theory-practice-screen-capture-image-recognition">Theory & practice. Screen capture & image recognition</a><ul>
<liclass="toctree-l3"><aclass="reference internal"href="#how-to-automate-image-recognition-on-pc">How to automate image recognition on PC</a></li>
<h1>3. How to use<aclass="headerlink"href="#how-to-use"title="Permalink to this headline">¶</a></h1>
<p>The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in OpenRPA.</p>
<p>The OpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways:
- Execute in python x32 (OpenRPAResourcesWPy32-3720python-3.7.2)
- Execute in python x64 (OpenRPAResourcesWPy64-3720python-3.7.2.amd64)
<h2>Theory & practice. Desktop app UI access (win32 and UI automation dlls)<aclass="headerlink"href="#theory-practice-desktop-app-ui-access-win32-and-ui-automation-dlls"title="Permalink to this headline">¶</a></h2>
<divclass="section"id="definitions">
<h3>Definitions<aclass="headerlink"href="#definitions"title="Permalink to this headline">¶</a></h3>
<p><strong>UIO</strong> - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]<br>
<strong>UIOSelector</strong> - List of dict (key attributes)<br>
<strong>PWA</strong> - PyWinAuto<br>
<strong>PWASpecification</strong> - List of dict (key attributes in pywinauto.find_window notation)<br>
<strong>UIOInfo</strong> - Dict of UIO attributes<br>
<strong>UIOActivity</strong> - Activity of the UIO (UI object) from the Pywinauto module<br>
<strong>UIOEI</strong> - UI Object info object</p>
</div>
<divclass="section"id="what-is-uio">
<h3>What is UIO?<aclass="headerlink"href="#what-is-uio"title="Permalink to this headline">¶</a></h3>
<p>UIO is a User Interface Object (pyOpenRPA terminology). For maximum compatibility, this instance is inherited from the object model developed in the [pywinauto library (click to get a list of available class functions)](<aclass="reference external"href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html">https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html</a>).</p>
<p>This approach allows us to implement useful functionality that has already been successfully developed in other libraries, and Supplement it with the missing functionality. In our case, the missing functionality is the ability to dynamically access UIO objects using UIO selectors.</p>
UIOSelector is the list of condition items for the UIO in GUI. Each item has condition attributes for detect applicable UIO. Here is the description of the available condition attributes in item.</p>
<dt>{</dt><dd><p>“depth_start” :: [int, start from 1] :: the depth index, where to start check the condition list (default 1),
“depth_end” :: [int, start from 1] :: the depth index, where to stop check the condition list (default 1),
“ctrl_index” || “index” :: [int, starts from 0] :: the index of the UIO in parent UIO child list,
“title” :: [str] :: the condition for the UIO attribute <em>title</em>,
“title_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>title</em>,
“rich_text” :: [str] :: the condition for the UIO attribute <em>rich_text</em>,
“rich_text_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>rich_text</em>,
“class_name” :: [str] :: the condition for the UIO attribute <em>class_name</em>,
“class_name_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>class_name</em>,
“friendly_class_name” :: [str] :: the condition for the UIO attribute <em>friendly_class_name</em>,
“friendly_class_name_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>friendly_class_name</em>,
“control_type” :: [str] :: the condition for the UIO attribute <em>control_type</em>,
“control_type_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>control_type</em>,
“is_enabled” :: [bool] :: the condition for the UIO attribute <em>is_enabled</em>. If UI object is enabled on GUI,
“is_visible” :: [bool] :: the condition for the UIO attribute <em>is_visible</em>. If UI object is visible on GUI,
“backend” :: [str, “win32” || “uia”] :: the method of UIO extraction (default “win32”). ATTENTION! Current option can be only for the first item of the UIO selector. For the next items this option will be implemented from the first item.</p>
<h3>The UIDesktop module (OpenRPA/Robot/UIDesktop.py)<aclass="headerlink"href="#the-uidesktop-module-openrpa-robot-uidesktop-py"title="Permalink to this headline">¶</a></h3>
<p>The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the <strong>win32</strong> and <strong>ui automation</strong> dll frameworks (big thx to the Microsoft :) ).</p>
<p><ahref="#id17"><spanclass="problematic"id="id18">*</span></a>Naming convention: <InArgument>_<ActivityName>_<OutArgument - if exist>*<br></p>
<h2>Theory & practice. WEB app UI access (selenium)<aclass="headerlink"href="#theory-practice-web-app-ui-access-selenium"title="Permalink to this headline">¶</a></h2>
<divclass="section"id="about">
<h3>About<aclass="headerlink"href="#about"title="Permalink to this headline">¶</a></h3>
<p>The pyOpenRPA support web app manipulation (by the Selenium lib).
More docs about selenium you can find here (<aclass="reference external"href="https://selenium-python.readthedocs.io/">https://selenium-python.readthedocs.io/</a>)</p>
</div>
<divclass="section"id="id19">
<h3>How to use<aclass="headerlink"href="#id19"title="Permalink to this headline">¶</a></h3>
<p>To start use selenium just import selenium modules in the robot tool. Here is the example of the usage.</p>
<h2>Theory & practice. Keyboard & mouse manipulation<aclass="headerlink"href="#theory-practice-keyboard-mouse-manipulation"title="Permalink to this headline">¶</a></h2>
<h2>Theory & practice. Screen capture & image recognition<aclass="headerlink"href="#theory-practice-screen-capture-image-recognition"title="Permalink to this headline">¶</a></h2>
<h3>How to automate image recognition on PC<aclass="headerlink"href="#how-to-automate-image-recognition-on-pc"title="Permalink to this headline">¶</a></h3>
<p>Here you can find any ways you need to use in your business case:
- Find the exact match on the screen with the other image
- Use text recognition module (OCR)
- Use computer vision (CV) to identify the objects on screen/image/video
- Use artificial intelligence (AI) to make custom identification/classification/text recognition</p>