UNPKG

ti-appium

Version:

An Appium wrapper to test Titanium applications

1,694 lines (450 loc) 22 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: Appc_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: Appc_Helper</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>Appc_Helper<span class="signature">()</span><span class="type-signature"></span></h2> </header> <article> <div class="container-overview"> <h4 class="name" id="Appc_Helper"><span class="type-signature"></span>new Appc_Helper<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Commands to interact with the Appcelerator and Titanium CLI. This contains a series of specific commands, or a more general runner command for your own CLI interactions. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="src_appcelerator.js.html">src/appcelerator.js</a>, <a href="src_appcelerator.js.html#line11">line 11</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".build"><span class="type-signature">(static) </span>build<span class="signature">(dir, platform, opts)</span><span class="type-signature"></span></h4> <div class="description"> Build a specified application for a given platform. Also allows users to specify their own arguments. </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>dir</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The path to the application root</td> </tr> <tr> <td class="name"><code>platform</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The mobile OS the app is being built for</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>args</code></td> <td class="type"> <span class="param-type">Array.&lt;String></span> </td> <td class="description last">Any additional arguments to be passed to the command</td> </tr> <tr> <td class="name"><code>ti</code></td> <td class="type"> <span class="param-type">Boolean</span> </td> <td class="description last">Whether or not to use the titanium CLI</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_appcelerator.js.html">src/appcelerator.js</a>, <a href="src_appcelerator.js.html#line223">line 223</a> </li></ul></dd> </dl> <h4 class="name" id=".createAppPath"><span class="type-signature">(static) </span>createAppPath<span class="signature">(dir, platform, appName)</span><span class="type-signature"></span></h4> <div class="description"> Generate a path to the built application based upon platform </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>dir</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The path to the root of the application project</td> </tr> <tr> <td class="name"><code>platform</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The relevant mobile OS</td> </tr> <tr> <td class="name"><code>appName</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The name of the app to identify the app package</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="src_appcelerator.js.html">src/appcelerator.js</a>, <a href="src_appcelerator.js.html#line303">line 303</a> </li></ul></dd> </dl> <h4 class="name" id=".installCLI"><span class="type-signature">(async, static) </span>installCLI<span class="signature">(appc)</span><span class="type-signature"></span></h4> <div class="description"> Install the latest version of the required CLI version for testing. </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>appc</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">The details for the Appcelerator run <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>cli</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The version of the CLI to install</td> </tr> <tr> <td class="name"><code>username</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The username to authenticate with</td> </tr> <tr> <td class="name"><code>password</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The password to authenticate with</td> </tr> <tr> <td class="name"><code>organisation</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The relevant org ID to log in to</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_appcelerator.js.html">src/appcelerator.js</a>, <a href="src_appcelerator.js.html#line173">line 173</a> </li></ul></dd> </dl> <h4 class="name" id=".installSDK"><span class="type-signature">(async, static) </span>installSDK<span class="signature">(sdk, force)</span><span class="type-signature"></span></h4> <div class="description"> Take the passed SDK, and attempt to install it. If it is a straight defined SDK, then install it. Otherwise if it is a branch, get the latest version of it. </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>sdk</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="default"> </td> <td class="description last">The version or branch of the SDK to install</td> </tr> <tr> <td class="name"><code>force</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 force re-install the SDK</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="src_appcelerator.js.html">src/appcelerator.js</a>, <a href="src_appcelerator.js.html#line130">line 130</a> </li></ul></dd> </dl> <h4 class="name" id=".login"><span class="type-signature">(async, static) </span>login<span class="signature">(appc, env)</span><span class="type-signature"></span></h4> <div class="description"> Login to the Appcelerator CLI using the login command. </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>appc</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">The details for the Appcelerator run <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>username</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The username to authenticate with</td> </tr> <tr> <td class="name"><code>password</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The password to authenticate with</td> </tr> <tr> <td class="name"><code>organisation</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The relevant org ID to log in to</td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>env</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The Appcelerator environment to login to.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="src_appcelerator.js.html">src/appcelerator.js</a>, <a href="src_appcelerator.js.html#line28">line 28</a> </li></ul></dd> </dl> <h4 class="name" id=".parseSDK"><span class="type-signature">(async, static) </span>parseSDK<span class="signature">(sdk)</span><span class="type-signature"></span></h4> <div class="description"> Takes in an SDK identifier and attempts to resolve it to the applicable SDK version. Can take a release version, pre-release version, or branch identifier and attempts to resolve it to an installable identifier. </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>sdk</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The version or branch of the SDK to validate</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="src_appcelerator.js.html">src/appcelerator.js</a>, <a href="src_appcelerator.js.html#line54">line 54</a> </li></ul></dd> </dl> <h4 class="name" id=".runner"><span class="type-signature">(static) </span>runner<span class="signature">(args, opts)</span><span class="type-signature"></span></h4> <div class="description"> Build a specified application for a given platform. Also allows users to specify their own arguments </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>args</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Arguments to be run after calling appc</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>matcher</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">A function that can be used to resolve</td> </tr> <tr> <td class="name"><code>ti</code></td> <td class="type"> <span class="param-type">Boolean</span> </td> <td class="description last">Whether or not to use the titanium CLI</td> </tr> <tr> <td class="name"><code>proc</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Custom name for the global, if empty no global will be created</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_appcelerator.js.html">src/appcelerator.js</a>, <a href="src_appcelerator.js.html#line344">line 344</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>