UNPKG

ti-appium

Version:

An Appium wrapper to test Titanium applications

756 lines (179 loc) 9.74 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: Appium_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: Appium_Helper</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>Appium_Helper<span class="signature">()</span><span class="type-signature"></span></h2> </header> <article> <div class="container-overview"> <h4 class="name" id="Appium_Helper"><span class="type-signature"></span>new Appium_Helper<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Functions for handling the Appium server and client sessions. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="src_appium.js.html">src/appium.js</a>, <a href="src_appium.js.html#line11">line 11</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".quitServ"><span class="type-signature">(async, static) </span>quitServ<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Tells the Appium server to shut down </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="src_appium.js.html">src/appium.js</a>, <a href="src_appium.js.html#line137">line 137</a> </li></ul></dd> </dl> <h4 class="name" id=".runAppium"><span class="type-signature">(async, static) </span>runAppium<span class="signature">(opts)</span><span class="type-signature"></span></h4> <div class="description"> Launch an Appium server for the mobile testing, as it cannot use the desktop session. </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>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>hostname</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The address of the Appium server to connect to</td> </tr> <tr> <td class="name"><code>port</code></td> <td class="type"> <span class="param-type">Int</span> </td> <td class="description last">The port of the server that the Appium server is running on</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_appium.js.html">src/appium.js</a>, <a href="src_appium.js.html#line120">line 120</a> </li></ul></dd> </dl> <h4 class="name" id=".startClient"><span class="type-signature">(async, static) </span>startClient<span class="signature">(capabilities)</span><span class="type-signature"></span></h4> <div class="description"> Starts a WD session on the device, using the given capability requirements as Appium configuration. </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>capabilities</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">Desired capabilities for Appium to run with</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="src_appium.js.html">src/appium.js</a>, <a href="src_appium.js.html#line23">line 23</a> </li></ul></dd> </dl> <h4 class="name" id=".stopClient"><span class="type-signature">(async, static) </span>stopClient<span class="signature">(softStop)</span><span class="type-signature"></span></h4> <div class="description"> Stops the WD session, but first it closes and removes the app from the device in an attempt to save storage space. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>softStop</code></td> <td class="type"> <span class="param-type">Boolean</span> </td> <td class="default"> false </td> <td class="description last">Whether or not to remove the app on stopping</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="src_appium.js.html">src/appium.js</a>, <a href="src_appium.js.html#line84">line 84</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>