ti-appium
Version:
An Appium wrapper to test Titanium applications
1,051 lines (260 loc) • 13.5 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Device_Helper</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Device_Helper</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>Device_Helper<span class="signature">()</span><span class="type-signature"></span></h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="Device_Helper"><span class="type-signature"></span>new Device_Helper<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Devices handling class, used to make shortcuts around the launching and
shutting down of emulators. Also has functions for finding iOS certificates
and provisioning profiles.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_device.js.html">src/device.js</a>, <a href="src_device.js.html#line8">line 8</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".getCert"><span class="type-signature">(async, static) </span>getCert<span class="signature">(type, search)</span><span class="type-signature"></span></h4>
<div class="description">
Use ioslib to probe the machine for a particular iOS certificate, then
return the certificate object.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">The type of operation the cert is defined for</td>
</tr>
<tr>
<td class="name"><code>search</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Part of the cert name, used to help locate it</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_device.js.html">src/device.js</a>, <a href="src_device.js.html#line83">line 83</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".getProfile"><span class="type-signature">(async, static) </span>getProfile<span class="signature">(type, search)</span><span class="type-signature"></span></h4>
<div class="description">
Use ioslib to probe the machine for a particular iOS provisioning profile,
then return the provisioning profile object.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">The type of operation the pp is defined for</td>
</tr>
<tr>
<td class="name"><code>search</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Part of the pp name, used to help locate it</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_device.js.html">src/device.js</a>, <a href="src_device.js.html#line121">line 121</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".getSimState"><span class="type-signature">(static) </span>getSimState<span class="signature">(simName, simVersion)</span><span class="type-signature"></span></h4>
<div class="description">
Get the boot status of an iOS simulator via its UDID
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>simName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">The name of the iOS device to find</td>
</tr>
<tr>
<td class="name"><code>simVersion</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">The version of the iOS device to find</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_device.js.html">src/device.js</a>, <a href="src_device.js.html#line50">line 50</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".killEmu"><span class="type-signature">(async, static) </span>killEmu<span class="signature">(deviceName)</span><span class="type-signature"></span></h4>
<div class="description">
Kill all the Android emulators.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>deviceName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">The name of the Android device to kill</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_device.js.html">src/device.js</a>, <a href="src_device.js.html#line62">line 62</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".killSim"><span class="type-signature">(async, static) </span>killSim<span class="signature">(simName, simVersion, opts)</span><span class="type-signature"></span></h4>
<div class="description">
Kill the iOS simulator using it's UDID, and then repeatedly check whether
it has fully shut down
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>simName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">The name of the iOS device to find</td>
</tr>
<tr>
<td class="name"><code>simVersion</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">The version of the iOS device to find</td>
</tr>
<tr>
<td class="name"><code>opts</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Optional arguments
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>initialWait</code></td>
<td class="type">
<span class="param-type">Int</span>
</td>
<td class="description last">How long to wait for the first boot check</td>
</tr>
<tr>
<td class="name"><code>intervalWait</code></td>
<td class="type">
<span class="param-type">Int</span>
</td>
<td class="description last">How long to wait between each check following the first</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_device.js.html">src/device.js</a>, <a href="src_device.js.html#line26">line 26</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="WebDriverCommands.html">WebDriverCommands</a></li></ul><h3>Classes</h3><ul><li><a href="Appc_Helper.html">Appc_Helper</a></li><li><a href="Appium_Helper.html">Appium_Helper</a></li><li><a href="Device_Helper.html">Device_Helper</a></li><li><a href="Mocha_Helper.html">Mocha_Helper</a></li><li><a href="Output_Helper.html">Output_Helper</a></li><li><a href="Webdriver_Helper.html">Webdriver_Helper</a></li></ul><h3>Global</h3><ul><li><a href="global.html#appcRun">appcRun</a></li><li><a href="global.html#appcSetup">appcSetup</a></li><li><a href="global.html#banner">banner</a></li><li><a href="global.html#buildApp">buildApp</a></li><li><a href="global.html#createAppPath">createAppPath</a></li><li><a href="global.html#debug">debug</a></li><li><a href="global.html#error">error</a></li><li><a href="global.html#finish">finish</a></li><li><a href="global.html#getCert">getCert</a></li><li><a href="global.html#getProfile">getProfile</a></li><li><a href="global.html#getSimState">getSimState</a></li><li><a href="global.html#info">info</a></li><li><a href="global.html#killEmulator">killEmulator</a></li><li><a href="global.html#killSimulator">killSimulator</a></li><li><a href="global.html#parseSDK">parseSDK</a></li><li><a href="global.html#skip">skip</a></li><li><a href="global.html#startAppium">startAppium</a></li><li><a href="global.html#startClient">startClient</a></li><li><a href="global.html#step">step</a></li><li><a href="global.html#stopAppium">stopAppium</a></li><li><a href="global.html#stopClient">stopClient</a></li><li><a href="global.html#test">test</a></li><li><a href="global.html#warn">warn</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Fri Aug 28 2020 10:09:07 GMT+0100 (British Summer Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>