create-kaixa
Version:
Katalon Studio wrapper to make manual test writing much easier.
14,943 lines • 163 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Kaixa - Documentation</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.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav style="border-right: 2px solid #ccc; padding-bottom: 25px;" >
<h2><a style="font-size: 27px;" href="index.html">Kaixa for Katalon</a></h2><h3>Functions:</h3><ul><li><a href="Kaixa.html">Kaixa</a><ul class='methods'><li data-type='method'><a href="Kaixa.html#.launchLTIUsingToken">launchLTIUsingToken</a></li><li data-type='method'><a href="Kaixa.html#assertAbsent">assertAbsent</a></li><li data-type='method'><a href="Kaixa.html#assertAbsentWithContents">assertAbsentWithContents</a></li><li data-type='method'><a href="Kaixa.html#assertDoesNotHaveClass">assertDoesNotHaveClass</a></li><li data-type='method'><a href="Kaixa.html#assertExists">assertExists</a></li><li data-type='method'><a href="Kaixa.html#assertExistsWithContents">assertExistsWithContents</a></li><li data-type='method'><a href="Kaixa.html#assertFalse">assertFalse</a></li><li data-type='method'><a href="Kaixa.html#assertHasClass">assertHasClass</a></li><li data-type='method'><a href="Kaixa.html#assertNumElements">assertNumElements</a></li><li data-type='method'><a href="Kaixa.html#assertNumElements">assertNumElements</a></li><li data-type='method'><a href="Kaixa.html#assertTrue">assertTrue</a></li><li data-type='method'><a href="Kaixa.html#chooseFile">chooseFile</a></li><li data-type='method'><a href="Kaixa.html#chooseSelectByLabel">chooseSelectByLabel</a></li><li data-type='method'><a href="Kaixa.html#chooseSelectByValue">chooseSelectByValue</a></li><li data-type='method'><a href="Kaixa.html#click">click</a></li><li data-type='method'><a href="Kaixa.html#clickByContents">clickByContents</a></li><li data-type='method'><a href="Kaixa.html#closeWindow">closeWindow</a></li><li data-type='method'><a href="Kaixa.html#convertToTestObject">convertToTestObject</a></li><li data-type='method'><a href="Kaixa.html#convertToWebElement">convertToWebElement</a></li><li data-type='method'><a href="Kaixa.html#descendantOf">descendantOf</a></li><li data-type='method'><a href="Kaixa.html#done">done</a></li><li data-type='method'><a href="Kaixa.html#elementAbsent">elementAbsent</a></li><li data-type='method'><a href="Kaixa.html#elementExists">elementExists</a></li><li data-type='method'><a href="Kaixa.html#elementWithContentsAbsent">elementWithContentsAbsent</a></li><li data-type='method'><a href="Kaixa.html#elementWithContentsExists">elementWithContentsExists</a></li><li data-type='method'><a href="Kaixa.html#ensureTestObject">ensureTestObject</a></li><li data-type='method'><a href="Kaixa.html#exitWithError">exitWithError</a></li><li data-type='method'><a href="Kaixa.html#extractDataFromClass">extractDataFromClass</a></li><li data-type='method'><a href="Kaixa.html#extractDataFromClassByContents">extractDataFromClassByContents</a></li><li data-type='method'><a href="Kaixa.html#find">find</a></li><li data-type='method'><a href="Kaixa.html#findByContents">findByContents</a></li><li data-type='method'><a href="Kaixa.html#findByXPath">findByXPath</a></li><li data-type='method'><a href="Kaixa.html#findChildOfAncestor">findChildOfAncestor</a></li><li data-type='method'><a href="Kaixa.html#getAttribute">getAttribute</a></li><li data-type='method'><a href="Kaixa.html#getContentsXPath">getContentsXPath</a></li><li data-type='method'><a href="Kaixa.html#getCurrentDay">getCurrentDay</a></li><li data-type='method'><a href="Kaixa.html#getCurrentMonth">getCurrentMonth</a></li><li data-type='method'><a href="Kaixa.html#getCurrentYear">getCurrentYear</a></li><li data-type='method'><a href="Kaixa.html#getDateString">getDateString</a></li><li data-type='method'><a href="Kaixa.html#getDateString">getDateString</a></li><li data-type='method'><a href="Kaixa.html#getDayAfterDays">getDayAfterDays</a></li><li data-type='method'><a href="Kaixa.html#getJSON">getJSON</a></li><li data-type='method'><a href="Kaixa.html#getJSONArray">getJSONArray</a></li><li data-type='method'><a href="Kaixa.html#getJSONObject">getJSONObject</a></li><li data-type='method'><a href="Kaixa.html#getJSONString">getJSONString</a></li><li data-type='method'><a href="Kaixa.html#getMonthAfterDays">getMonthAfterDays</a></li><li data-type='method'><a href="Kaixa.html#getProfileValue">getProfileValue</a></li><li data-type='method'><a href="Kaixa.html#getQuery">getQuery</a></li><li data-type='method'><a href="Kaixa.html#getSource">getSource</a></li><li data-type='method'><a href="Kaixa.html#getText">getText</a></li><li data-type='method'><a href="Kaixa.html#getTitle">getTitle</a></li><li data-type='method'><a href="Kaixa.html#getURL">getURL</a></li><li data-type='method'><a href="Kaixa.html#getYearAfterDays">getYearAfterDays</a></li><li data-type='method'><a href="Kaixa.html#handleHarvardKey">handleHarvardKey</a></li><li data-type='method'><a href="Kaixa.html#isSafari">isSafari</a></li><li data-type='method'><a href="Kaixa.html#launchAs">launchAs</a></li><li data-type='method'><a href="Kaixa.html#listSelectLabels">listSelectLabels</a></li><li data-type='method'><a href="Kaixa.html#locationToURL">locationToURL</a></li><li data-type='method'><a href="Kaixa.html#log">log</a></li><li data-type='method'><a href="Kaixa.html#openAnchorInSameTab">openAnchorInSameTab</a></li><li data-type='method'><a href="Kaixa.html#padWithZeros">padWithZeros</a></li><li data-type='method'><a href="Kaixa.html#parentOf">parentOf</a></li><li data-type='method'><a href="Kaixa.html#pause">pause</a></li><li data-type='method'><a href="Kaixa.html#prompt">prompt</a></li><li data-type='method'><a href="Kaixa.html#promptPassword">promptPassword</a></li><li data-type='method'><a href="Kaixa.html#refresh">refresh</a></li><li data-type='method'><a href="Kaixa.html#runScript">runScript</a></li><li data-type='method'><a href="Kaixa.html#scrollTo">scrollTo</a></li><li data-type='method'><a href="Kaixa.html#sendAPIRequest">sendAPIRequest</a></li><li data-type='method'><a href="Kaixa.html#sendGETRequest">sendGETRequest</a></li><li data-type='method'><a href="Kaixa.html#setDefaultHost">setDefaultHost</a></li><li data-type='method'><a href="Kaixa.html#setDontUseHTTPS">setDontUseHTTPS</a></li><li data-type='method'><a href="Kaixa.html#startControllingIFrame">startControllingIFrame</a></li><li data-type='method'><a href="Kaixa.html#stopControllingIFrame">stopControllingIFrame</a></li><li data-type='method'><a href="Kaixa.html#typeInto">typeInto</a></li><li data-type='method'><a href="Kaixa.html#uniquify">uniquify</a></li><li data-type='method'><a href="Kaixa.html#uniquifySimple">uniquifySimple</a></li><li data-type='method'><a href="Kaixa.html#visit">visit</a></li><li data-type='method'><a href="Kaixa.html#visitCanvasDELETEEndpoint">visitCanvasDELETEEndpoint</a></li><li data-type='method'><a href="Kaixa.html#visitCanvasGETEndpoint">visitCanvasGETEndpoint</a></li><li data-type='method'><a href="Kaixa.html#visitCanvasPOSTEndpoint">visitCanvasPOSTEndpoint</a></li><li data-type='method'><a href="Kaixa.html#waitFor">waitFor</a></li><li data-type='method'><a href="Kaixa.html#waitForAtLeastOneElementPresent">waitForAtLeastOneElementPresent</a></li><li data-type='method'><a href="Kaixa.html#waitForElementAbsent">waitForElementAbsent</a></li><li data-type='method'><a href="Kaixa.html#waitForElementPresent">waitForElementPresent</a></li><li data-type='method'><a href="Kaixa.html#waitForElementVisible">waitForElementVisible</a></li><li data-type='method'><a href="Kaixa.html#waitForElementWithContentsPresent">waitForElementWithContentsPresent</a></li><li data-type='method'><a href="Kaixa.html#waitForElementWithContentsVisible">waitForElementWithContentsVisible</a></li></ul></li></ul>
</nav>
<div id="main">
<section>
<header>
<h2>
Kaixa
</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">Kaixa commands</div>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".launchLTIUsingToken"><span class="type-signature">(static) </span>launchLTIUsingToken<span class="signature">(accessToken, courseId<span class="signature-attributes">opt</span>, appName<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Log into Canvas using an access token
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>accessToken</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the user's access token</td>
</tr>
<tr>
<td class="name"><code>courseId</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>courseId from profile</code>
</td>
<td class="description last">the Canvas ID of the course to launch from</td>
</tr>
<tr>
<td class="name"><code>appName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>appName from profile</code>
</td>
<td class="description last">the name of the app as it appears in the course's left-hand nav</td>
</tr>
</tbody>
</table>
<h4 class="name" id="assertAbsent"><span class="type-signature"></span>assertAbsent<span class="signature">(item, message<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Make sure an element does not exist
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the TestObject or CSS selector</td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>generated message</code>
</td>
<td class="description last">a human-readable message to
display if the test fails</td>
</tr>
</tbody>
</table>
<h4 class="name" id="assertAbsentWithContents"><span class="type-signature"></span>assertAbsentWithContents<span class="signature">(contents, selector, message<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Make sure an element with specific contents does not exist
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>contents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the contents to search for</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">a CSS selector corresponding to the item</td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>generated message</code>
</td>
<td class="description last">a human-readable message to
display if the test fails</td>
</tr>
</tbody>
</table>
<h4 class="name" id="assertDoesNotHaveClass"><span class="type-signature"></span>assertDoesNotHaveClass<span class="signature">(item, className, message<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Make sure an element does not have a specific class name
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the TestObject or CSS selector of interest</td>
</tr>
<tr>
<td class="name"><code>className</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the name of the class to expect</td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>generated message</code>
</td>
<td class="description last">a human-readable message to
display if the test fails</td>
</tr>
</tbody>
</table>
<h4 class="name" id="assertExists"><span class="type-signature"></span>assertExists<span class="signature">(item, message<span class="signature-attributes">opt</span>, gracePeriodSecs<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Make sure an element exists
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the TestObject or CSS selector</td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>generated message</code>
</td>
<td class="description last">a human-readable message to
display if the test fails</td>
</tr>
<tr>
<td class="name"><code>gracePeriodSecs</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>10</code>
</td>
<td class="description last">the number of seconds to wait before
throwing an error</td>
</tr>
</tbody>
</table>
<h4 class="name" id="assertExistsWithContents"><span class="type-signature"></span>assertExistsWithContents<span class="signature">(contents, selector, message<span class="signature-attributes">opt</span>, gracePeriodSecs<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Make sure an element with specific contents exists
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>contents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the contents to search for</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">a CSS selector corresponding to the item</td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>generated message</code>
</td>
<td class="description last">a human-readable message to
display if the test fails</td>
</tr>
<tr>
<td class="name"><code>gracePeriodSecs</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>10</code>
</td>
<td class="description last">the number of seconds to wait before
throwing an error</td>
</tr>
</tbody>
</table>
<h4 class="name" id="assertFalse"><span class="type-signature"></span>assertFalse<span class="signature">(value, message<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Make sure an expression evaluates to false
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the value that should be false</td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>unknown</code>
</td>
<td class="description last">a human-readable message to
display if the test fails</td>
</tr>
</tbody>
</table>
<h4 class="name" id="assertHasClass"><span class="type-signature"></span>assertHasClass<span class="signature">(item, className, message<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Make sure an element has a specific class name
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the TestObject or CSS selector of interest</td>
</tr>
<tr>
<td class="name"><code>className</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the name of the class to expect</td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>generated message</code>
</td>
<td class="description last">a human-readable message to
display if the test fails</td>
</tr>
</tbody>
</table>
<h4 class="name" id="assertNumElements"><span class="type-signature"></span>assertNumElements<span class="signature">(selector)</span><span class="type-signature"> → {Integer}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get number of elements
</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>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a CSS selector corresponding to the item</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the number of elements on the page
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Integer</span>
</dd>
</dl>
<h4 class="name" id="assertNumElements"><span class="type-signature"></span>assertNumElements<span class="signature">(selector, num)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Assert a certain number of elements
</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>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a CSS selector corresponding to the item</td>
</tr>
<tr>
<td class="name"><code>num</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last">the precise number of elements expected</td>
</tr>
</tbody>
</table>
<h4 class="name" id="assertTrue"><span class="type-signature"></span>assertTrue<span class="signature">(value, message<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Make sure an expression evaluates to true
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the value that should be true</td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>unknown</code>
</td>
<td class="description last">a human-readable message to
display if the test fails</td>
</tr>
</tbody>
</table>
<h4 class="name" id="chooseFile"><span class="type-signature"></span>chooseFile<span class="signature">(item, filePath)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Choose a file for a file chooser
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector of the select element</td>
</tr>
<tr>
<td class="name"><code>filePath</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the path of the file</td>
</tr>
</tbody>
</table>
<h4 class="name" id="chooseSelectByLabel"><span class="type-signature"></span>chooseSelectByLabel<span class="signature">(item, label)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Choose an item in a select element based on its label
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector of the select element</td>
</tr>
<tr>
<td class="name"><code>label</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the label to select in the dropdown</td>
</tr>
</tbody>
</table>
<h4 class="name" id="chooseSelectByValue"><span class="type-signature"></span>chooseSelectByValue<span class="signature">(item, value)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Choose an item in a select element based on its value
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector of the select element</td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the value of the item to select in the dropdown</td>
</tr>
</tbody>
</table>
<h4 class="name" id="click"><span class="type-signature"></span>click<span class="signature">(item, timeoutSec<span class="signature-attributes">opt</span>, dontScrollTo<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Click an element
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the TestObject or CSS selector of interest</td>
</tr>
<tr>
<td class="name"><code>timeoutSec</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>10</code>
</td>
<td class="description last">the number of seconds to wait before timing out</td>
</tr>
<tr>
<td class="name"><code>dontScrollTo</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last">if true, do not scroll to the element</td>
</tr>
</tbody>
</table>
<h4 class="name" id="clickByContents"><span class="type-signature"></span>clickByContents<span class="signature">(contents, selector)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Click an item by defining its contents
</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>contents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the contents to search for</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a CSS selector corresponding to the item</td>
</tr>
</tbody>
</table>
<h4 class="name" id="closeWindow"><span class="type-signature"></span>closeWindow<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Close the current window/tab
</div>
<h4 class="name" id="convertToTestObject"><span class="type-signature"></span>convertToTestObject<span class="signature">(obj)</span><span class="type-signature"> → {TestObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Convert a Selenium WebElement into a TestObject
</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>obj</code></td>
<td class="type">
<span class="param-type">WebElement</span>
</td>
<td class="description last">the element to convert</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the corresponding object
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">TestObject</span>
</dd>
</dl>
<h4 class="name" id="convertToWebElement"><span class="type-signature"></span>convertToWebElement<span class="signature">(obj)</span><span class="type-signature"> → {WebElement}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Convert a TestObject into a Selenium WebElement
</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>obj</code></td>
<td class="type">
<span class="param-type">TestObject</span>
</td>
<td class="description last">the object to convert</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the corresponding element
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">WebElement</span>
</dd>
</dl>
<h4 class="name" id="descendantOf"><span class="type-signature"></span>descendantOf<span class="signature">(item, selector)</span><span class="type-signature"> → {TestObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the first descendant of an element that matches the selector
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector of the parent</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the selector to use to search for the descendant</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
child element
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">TestObject</span>
</dd>
</dl>
<h4 class="name" id="done"><span class="type-signature"></span>done<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Close the browser
</div>
<h4 class="name" id="elementAbsent"><span class="type-signature"></span>elementAbsent<span class="signature">(item)</span><span class="type-signature"> → {boolean}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Check if an element does not exist
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
true if the element does not exist on the page
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="elementExists"><span class="type-signature"></span>elementExists<span class="signature">(item)</span><span class="type-signature"> → {boolean}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Check if an element exists
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
true if the element exists on the page
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="elementWithContentsAbsent"><span class="type-signature"></span>elementWithContentsAbsent<span class="signature">(contents, selector)</span><span class="type-signature"> → {boolean}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Check if an element with specific contents does not exist
</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>contents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the contents to search for</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a CSS selector corresponding to the item</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
true if the element does not exist on the page
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="elementWithContentsExists"><span class="type-signature"></span>elementWithContentsExists<span class="signature">(contents, selector)</span><span class="type-signature"> → {boolean}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Check if an element with specific contents exists
</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>contents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the contents to search for</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a CSS selector corresponding to the item</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
true if the element exists on the page
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="ensureTestObject"><span class="type-signature"></span>ensureTestObject<span class="signature">(item)</span><span class="type-signature"> → {TestObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Make sure an item is a TestObject. If it is a CSS selector, turn it into a TestObject
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
a TestObject
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">TestObject</span>
</dd>
</dl>
<h4 class="name" id="exitWithError"><span class="type-signature"></span>exitWithError<span class="signature">(message)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Exit with an error
</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>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a human-readable message to display</td>
</tr>
</tbody>
</table>
<h4 class="name" id="extractDataFromClass"><span class="type-signature"></span>extractDataFromClass<span class="signature">(item, classPrefix)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Extract info from a class
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector of the element</td>
</tr>
<tr>
<td class="name"><code>classPrefix</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the prefix of the class. Example: if there is
a class "Event-12345" then with classPrefix "Event-" the return of this
function would be "12345"</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
value following the prefix
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="extractDataFromClassByContents"><span class="type-signature"></span>extractDataFromClassByContents<span class="signature">(contents, selector, classPrefix)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Extract info from a class
</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>contents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the contents to search for</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a CSS selector corresponding to the item</td>
</tr>
<tr>
<td class="name"><code>classPrefix</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the prefix of the class. Example: if there is
a class "Event-12345" then with classPrefix "Event-" the return of this
function would be "12345"</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
value following the prefix
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="find"><span class="type-signature"></span>find<span class="signature">(selector)</span><span class="type-signature"> → {TestObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Given a CSS selector, find the TestObject
</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>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the css selector to search for</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the item
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">TestObject</span>
</dd>
</dl>
<h4 class="name" id="findByContents"><span class="type-signature"></span>findByContents<span class="signature">(contents, selector)</span><span class="type-signature"> → {TestObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Given the contents and a CSS selector for an element, find the TestObject
</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>contents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the contents of the object.
NOTE: must be the contents of the element,
not contents of a child element!</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a css selector for the element
Supported css selectors:
All Elements: null or "*"
All P Elements: "p"
All Child Elements of p: "p > *"
Element By ID: "#foo"
Element By Class: ".foo"
Element With Attribute: "*[title]"
First Child of P: "p > *:first-child"
Next Element after P: "p + *"</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the matching object
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">TestObject</span>
</dd>
</dl>
<h4 class="name" id="findByXPath"><span class="type-signature"></span>findByXPath<span class="signature">(xPath)</span><span class="type-signature"> → {TestObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Rute Santos</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Given an XPATH selector, find the TestObject
</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>xPath</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the xpath selector to search for</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the item
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">TestObject</span>
</dd>
</dl>
<h4 class="name" id="findChildOfAncestor"><span class="type-signature"></span>findChildOfAncestor<span class="signature">(args)</span><span class="type-signature"> → {TestObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Find an element by traversing the element tree: from the start element,
traverse up the tree to the specified ancestor and then back down
any number of levels to the first matching child
</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">Map</span>
</td>
<td class="description last">all arguments in one map
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>startSelector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">css selector for the start
element</td>
</tr>
<tr>
<td class="name"><code>startContents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last">text contents to use to narrow the
search for the start element. NOTE: must be the contents of the element,
not contents of a child element!</td>
</tr>
<tr>
<td class="name"><code>ancestor</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>parent</code>
</td>
<td class="description last">the ancestor to traverse
up to. Allowed options: "parent" or "grandparent" or "greatgrandparent"
or "greatgreatgrandparent"</td>
</tr>
<tr>
<td class="name"><code>ancestorLevel</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>1</code>
</td>
<td class="description last">alternative method for identifying
the ancestor (1 = parent, 2 = grandparent, 3 = greatgrandparent, ...)</td>
</tr>
<tr>
<td class="name"><code>childSelector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">css selector for the child
element</td>
</tr>
<tr>
<td class="name"><code>childContents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last">text contents to use to narrow the
search for the child element. NOTE: must be the contents of the element,
not contents of a child element!</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
element
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">TestObject</span>
</dd>
</dl>
<h4 class="name" id="getAttribute"><span class="type-signature"></span>getAttribute<span class="signature">(item, attribute)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get an attribute of an element
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector</td>
</tr>
<tr>
<td class="name"><code>attribute</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the name of the attribute to get</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
value of the attribute
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="getContentsXPath"><span class="type-signature"></span>getContentsXPath<span class="signature">(contents, selector)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get an xpath for finding an element based on a css selector and contents
</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>contents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the contents of the object</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a css selector for the element
Supported css selectors:
All Elements: null or "*"
All P Elements: "p"
All Child Elements of p: "p > *"
Element By ID: "#foo"
Element By Class: ".foo"
Element With Attribute: "*[title]", "a[title='foo']"
First Child of P: "p > *:first-child"
Next Element after P: "p + *"</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
xpath to use to find the element
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="getCurrentDay"><span class="type-signature"></span>getCurrentDay<span class="signature">()</span><span class="type-signature"> → {int}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the current day
</div>
<h5>Returns:</h5>
<div class="param-desc">
day
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">int</span>
</dd>
</dl>
<h4 class="name" id="getCurrentMonth"><span class="type-signature"></span>getCurrentMonth<span class="signature">()</span><span class="type-signature"> → {int}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the current month
</div>
<h5>Returns:</h5>
<div class="param-desc">
month
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">int</span>
</dd>
</dl>
<h4 class="name" id="getCurrentYear"><span class="type-signature"></span>getCurrentYear<span class="signature">()</span><span class="type-signature"> → {int}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the current year
</div>
<h5>Returns:</h5>
<div class="param-desc">
year
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">int</span>
</dd>
</dl>
<h4 class="name" id="getDateString"><span class="type-signature"></span>getDateString<span class="signature">()</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the current date as a fully-formed string
</div>
<h5>Returns:</h5>
<div class="param-desc">
date in form mm/dd/yyyy
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="getDateString"><span class="type-signature"></span>getDateString<span class="signature">(days)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the current date as a fully-formed string
</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>days</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">number of days that will have passed (can be negative)</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
date in form mm/dd/yyyy
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="getDayAfterDays"><span class="type-signature"></span>getDayAfterDays<span class="signature">(days)</span><span class="type-signature"> → {int}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the day after a certain number of days have passed
</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>days</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">number of days that will have passed (can be negative)</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
day
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">int</span>
</dd>
</dl>
<h4 class="name" id="getJSON"><span class="type-signature"></span>getJSON<span class="signature">()</span><span class="type-signature"> → {JSONObject|JSONArray}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the JSON object or array on the page
</div>
<h5>Returns:</h5>
<div class="param-desc">
the JSON info on the page
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">JSONObject</span>
|
<span class="param-type">JSONArray</span>
</dd>
</dl>
<h4 class="name" id="getJSONArray"><span class="type-signature"></span>getJSONArray<span class="signature">()</span><span class="type-signature"> → {JSONArray}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the JSON array on the page
</div>
<h5>Returns:</h5>
<div class="param-desc">
the JSON array on the page
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">JSONArray</span>
</dd>
</dl>
<h4 class="name" id="getJSONObject"><span class="type-signature"></span>getJSONObject<span class="signature">()</span><span class="type-signature"> → {JSONObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the JSON object on the page
</div>
<h5>Returns:</h5>
<div class="param-desc">
the JSON object on the page
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">JSONObject</span>
</dd>
</dl>
<h4 class="name" id="getJSONString"><span class="type-signature"></span>getJSONString<span class="signature">()</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the JSON string on the current page
</div>
<h5>Returns:</h5>
<div class="param-desc">
the JSON string
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="getMonthAfterDays"><span class="type-signature"></span>getMonthAfterDays<span class="signature">(days)</span><span class="type-signature"> → {int}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the month after a certain number of days have passed
</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>days</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">number of days that will have passed (can be negative)</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
month
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">int</span>
</dd>
</dl>
<h4 class="name" id="getProfileValue"><span class="type-signature"></span>getProfileValue<span class="signature">(name)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get a value from the profile
</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>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the name of the profile variable</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the value
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="getQuery"><span class="type-signature"></span>getQuery<span class="signature">()</span><span class="type-signature"> → {Map.<String, String>}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the current URL of the page
</div>
<h5>Returns:</h5>
<div class="param-desc">
map of query parameters
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Map.<String, String></span>
</dd>
</dl>
<h4 class="name" id="getSource"><span class="type-signature"></span>getSource<span class="signature">()</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the source of the page
</div>
<h5>Returns:</h5>
<div class="param-desc">
the source of the current page
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="getText"><span class="type-signature"></span>getText<span class="signature">(item)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the text in an element
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the contents of the element as text
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="getTitle"><span class="type-signature"></span>getTitle<span class="signature">()</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the title of the current window
</div>
<h5>Returns:</h5>
<div class="param-desc">
the title of the window
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="getURL"><span class="type-signature"></span>getURL<span class="signature">()</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the current URL of the page
</div>
<h5>Returns:</h5>
<div class="param-desc">
the source of the current page
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="getYearAfterDays"><span class="type-signature"></span>getYearAfterDays<span class="signature">(days)</span><span class="type-signature"> → {int}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the year after a certain number of days have passed
</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>days</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">number of days that will have passed (can be negative)</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
year
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">int</span>
</dd>
</dl>
<h4 class="name" id="handleHarvardKey"><span class="type-signature"></span>handleHarvardKey<span class="signature">(name)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Handle a HarvardKey login page for a user
</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>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the name of the variable containing the credentials for the user</td>
</tr>
</tbody>
</table>
<h4 class="name" id="isSafari"><span class="type-signature"></span>isSafari<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Check if the currently-opened window is a Safari browser window
</div>
<h5>Returns:</h5>
<div class="param-desc">
true if the browser is Safari
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="launchAs"><span class="type-signature"></span>launchAs<span class="signature">(name, courseId<span class="signature-attributes">opt</span>, appName<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Log into Canvas and launch an LTI app as a specific user from the profile variables.
The value should be a JSON string with the following properties: { [accessToken], [username], [password], [isXID] }
If the accessToken is excluded, we will attempt to launch using the username.
If logging in with a username and the password is excluded, the test runner is prompted to run a password.
If isXID is true, the user will be logged in using the XID login panel.
If both accessToken and username are excluded, the test runner will be prompted to enter an accessToken.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the name of the variable containing the credentials for the user</td>
</tr>
<tr>
<td class="name"><code>courseId</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>courseId from profile</code>
</td>
<td class="description last">the Canvas ID of the course to launch from</td>
</tr>
<tr>
<td class="name"><code>appName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>appName from profile</code>
</td>
<td class="description last">the name of the app as it appears in the course's left-hand nav</td>
</tr>
</tbody>
</table>
<h4 class="name" id="listSelectLabels"><span class="type-signature"></span>listSelectLabels<span class="signature">(selector)</span><span class="type-signature"> → {Array.<String>}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the list of labels in a select
</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>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the css selector for the select element</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
list of labels
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<String></span>
</dd>
</dl>
<h4 class="name" id="locationToURL"><span class="type-signature"></span>locationToURL<span class="signature">(location)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Turn a location into a URL
</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>location</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the location to translate (may be a path or a full URL)</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
URL
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="log"><span class="type-signature"></span>log<span class="signature">(message)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Log a message to the console
</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>message</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">the message to log</td>
</tr>
</tbody>
</table>
<h4 class="name" id="openAnchorInSameTab"><span class="type-signature"></span>openAnchorInSameTab<span class="signature">(item)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Open an anchor link in the same tab
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector of interest</td>
</tr>
</tbody>
</table>
<h4 class="name" id="padWithZeros"><span class="type-signature"></span>padWithZeros<span class="signature">(number, digits)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Pad a number with zeros
</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>number</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">the number to pad</td>
</tr>
<tr>
<td class="name"><code>digits</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">number of digits to require (must be at least this
long</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
padded number
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="parentOf"><span class="type-signature"></span>parentOf<span class="signature">(item)</span><span class="type-signature"> → {TestObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the parent of an element
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
parent element
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">TestObject</span>
</dd>
</dl>
<h4 class="name" id="pause"><span class="type-signature"></span>pause<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Pause until the user clicks okay
</div>
<h4 class="name" id="prompt"><span class="type-signature"></span>prompt<span class="signature">(label, title)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get text from a test runner user. Throws an error if the text is empty
</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>label</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the label to put in front of the text field</td>
</tr>
<tr>
<td class="name"><code>title</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the title of the prompt window</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the trimmed text that the user entered
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="promptPassword"><span class="type-signature"></span>promptPassword<span class="signature">(label, title)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get a password from a test runner user. Throws an error if the text is
empty
</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>label</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the label to put in front of the text field</td>
</tr>
<tr>
<td class="name"><code>title</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the title of the prompt window</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the trimmed text that the user entered
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="refresh"><span class="type-signature"></span>refresh<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Refresh the page
</div>
<h4 class="name" id="runScript"><span class="type-signature"></span>runScript<span class="signature">(script)</span><span class="type-signature"> → {Object}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Run a script on the page
</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>script</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the script to run in an anonymous function on the page.
If multiple script arguments are included, each argument will be considered a
new line of the script.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
return value
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h4 class="name" id="scrollTo"><span class="type-signature"></span>scrollTo<span class="signature">(item)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Scroll the page to the element
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector of interest</td>
</tr>
</tbody>
</table>
<h4 class="name" id="sendAPIRequest"><span class="type-signature"></span>sendAPIRequest<span class="signature">(args, host, path, body)</span><span class="type-signature"> → {JSONObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Send an API request to an endpoint on the server associated with the current page
</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">Map</span>
</td>
<td class="description last">all arguments in one map</td>
</tr>
<tr>
<td class="name"><code>host</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the host of the API</td>
</tr>
<tr>
<td class="name"><code>path</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the path of the API</td>
</tr>
<tr>
<td class="name"><code>body</code></td>
<td class="type">
<span class="param-type">JSONObject</span>
</td>
<td class="description last">the body of the post request</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
JSON response
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">JSONObject</span>
</dd>
</dl>
<h4 class="name" id="sendGETRequest"><span class="type-signature"></span>sendGETRequest<span class="signature">(location)</span><span class="type-signature"> → {JSONArray|JSONObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Send a GET request
</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>location</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">path or URL to visit</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
response
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">JSONArray</span>
|
<span class="param-type">JSONObject</span>
</dd>
</dl>
<h4 class="name" id="setDefaultHost"><span class="type-signature"></span>setDefaultHost<span class="signature">(host)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Set the default host
</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>host</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">name</td>
</tr>
</tbody>
</table>
<h4 class="name" id="setDontUseHTTPS"><span class="type-signature"></span>setDontUseHTTPS<span class="signature">(dontUseHTTPS)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Set whether or not to use HTTPS by default
</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>dontUseHTTPS</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last">true if not using HTTPS by default</td>
</tr>
</tbody>
</table>
<h4 class="name" id="startControllingIFrame"><span class="type-signature"></span>startControllingIFrame<span class="signature">(item)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Start controlling an iframe
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector of the iframe</td>
</tr>
</tbody>
</table>
<h4 class="name" id="stopControllingIFrame"><span class="type-signature"></span>stopControllingIFrame<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Stop controlling an iframe and return to the main page
</div>
<h4 class="name" id="typeInto"><span class="type-signature"></span>typeInto<span class="signature">(item, text, pressEnter)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Type text into an element. This function first removes the previous text in the element
</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>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">the TestObject or CSS selector of interest</td>
</tr>
<tr>
<td class="name"><code>text</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the text to type</td>
</tr>
<tr>
<td class="name"><code>pressEnter</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last">if true, after typing into the text field,
simulate pressing enter</td>
</tr>
</tbody>
</table>
<h4 class="name" id="uniquify"><span class="type-signature"></span>uniquify<span class="signature">(name)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Add a unique tag to an object name. Tag may add up to 20 chars.
</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>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the name of the item</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the new name of the item with the unique tag
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="uniquifySimple"><span class="type-signature"></span>uniquifySimple<span class="signature">(name)</span><span class="type-signature"> → {String}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Add a simple unique tag to an object name, where the simple tag is just
numbers. Tag will be at most 16 chars
</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>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the name of the item</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the new name of the item with the unique tag
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id="visit"><span class="type-signature"></span>visit<span class="signature">(location)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Visit a location in the browser
</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>location</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">path or URL to visit</td>
</tr>
</tbody>
</table>
<h4 class="name" id="visitCanvasDELETEEndpoint"><span class="type-signature"></span>visitCanvasDELETEEndpoint<span class="signature">(path, accessToken, payload)</span><span class="type-signature"> → {JSONArray|JSONObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Send a DELETE request to a Canvas API endpoint
</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></code></td>
<td class="type">
<span class="param-type">Map</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>path</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the path of the API, excluding https://canvas.harvard.edu, example: "/api/v1/users"</td>
</tr>
<tr>
<td class="name"><code>accessToken</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a Canvas access token</td>
</tr>
<tr>
<td class="name"><code>payload</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the body of the post request</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
Canvas response
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">JSONArray</span>
|
<span class="param-type">JSONObject</span>
</dd>
</dl>
<h4 class="name" id="visitCanvasGETEndpoint"><span class="type-signature"></span>visitCanvasGETEndpoint<span class="signature">(path, accessToken)</span><span class="type-signature"> → {JSONArray|JSONObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Get the value of a Canvas GET API endpoint. Automatically adds a per_page=200 param
</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>path</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the path of the API, excluding https://canvas.harvard.edu/api/v1, example: "/users"</td>
</tr>
<tr>
<td class="name"><code>accessToken</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a Canvas access token</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
Canvas response
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">JSONArray</span>
|
<span class="param-type">JSONObject</span>
</dd>
</dl>
<h4 class="name" id="visitCanvasPOSTEndpoint"><span class="type-signature"></span>visitCanvasPOSTEndpoint<span class="signature">(path, accessToken, payload)</span><span class="type-signature"> → {JSONArray|JSONObject}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Send a POST request to a Canvas API endpoint
</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></code></td>
<td class="type">
<span class="param-type">Map</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>path</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the path of the API, excluding https://canvas.harvard.edu, example: "/api/v1/users"</td>
</tr>
<tr>
<td class="name"><code>accessToken</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">a Canvas access token</td>
</tr>
<tr>
<td class="name"><code>payload</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the body of the post request</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
Canvas response
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">JSONArray</span>
|
<span class="param-type">JSONObject</span>
</dd>
</dl>
<h4 class="name" id="waitFor"><span class="type-signature"></span>waitFor<span class="signature">(ms)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Wait for a specific number of milliseconds
</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>ms</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">the number of ms to wait</td>
</tr>
</tbody>
</table>
<h4 class="name" id="waitForAtLeastOneElementPresent"><span class="type-signature"></span>waitForAtLeastOneElementPresent<span class="signature">(items, timeoutSec<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Object}</span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Wait for any element in a list to be present (check every tenth of a
second for status)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>items</code></td>
<td class="type">
<span class="param-type">ArrayList.<(Object|String)></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">list of TestObject or CSS
selectors of interest</td>
</tr>
<tr>
<td class="name"><code>timeoutSec</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>10</code>
</td>
<td class="description last">the number of seconds to wait before
timing out</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
the item that was found first, ties broken by which item
shows up in the list first
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h4 class="name" id="waitForElementAbsent"><span class="type-signature"></span>waitForElementAbsent<span class="signature">(item, timeoutSec<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Wait for an element to not be present (on the page, it does not have to be visible)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the TestObject or CSS selector of interest</td>
</tr>
<tr>
<td class="name"><code>timeoutSec</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>10</code>
</td>
<td class="description last">the number of seconds to wait before timing out</td>
</tr>
</tbody>
</table>
<h4 class="name" id="waitForElementPresent"><span class="type-signature"></span>waitForElementPresent<span class="signature">(item, timeoutSec<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Wait for an element to be present (on the page, it does not have to be visible)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the TestObject or CSS selector of interest</td>
</tr>
<tr>
<td class="name"><code>timeoutSec</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>10</code>
</td>
<td class="description last">the number of seconds to wait before timing out</td>
</tr>
</tbody>
</table>
<h4 class="name" id="waitForElementVisible"><span class="type-signature"></span>waitForElementVisible<span class="signature">(item, timeoutSec<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Wait for an element to be visible
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>item</code></td>
<td class="type">
<span class="param-type">TestObject</span>
|
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the TestObject or CSS selector of interest</td>
</tr>
<tr>
<td class="name"><code>timeoutSec</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>10</code>
</td>
<td class="description last">the number of seconds to wait before timing out</td>
</tr>
</tbody>
</table>
<h4 class="name" id="waitForElementWithContentsPresent"><span class="type-signature"></span>waitForElementWithContentsPresent<span class="signature">(contents, selector, timeoutSec<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Wait for an element with specific contents to be present (on the page, it does not have to be visible)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>contents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the contents to search for</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">a CSS selector corresponding to the item</td>
</tr>
<tr>
<td class="name"><code>timeoutSec</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>10</code>
</td>
<td class="description last">the number of seconds to wait before timing out</td>
</tr>
</tbody>
</table>
<h4 class="name" id="waitForElementWithContentsVisible"><span class="type-signature"></span>waitForElementWithContentsVisible<span class="signature">(contents, selector, timeoutSec<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Gabe Abrams</li>
</ul>
</dd>
</dl>
<div class="description usertext">
Wait for an element with specific contents to be visible
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>contents</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the contents to search for</td>
</tr>
<tr>
<td class="name"><code>selector</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">a CSS selector corresponding to the item</td>
</tr>
<tr>
<td class="name"><code>timeoutSec</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>10</code>
</td>
<td class="description last">the number of seconds to wait before timing out</td>
</tr>
</tbody>
</table>
</article>
</section>
</div>
<br class="clear">
<footer>
We use <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> and the <a href="https://github.com/clenemt/docdash">docdash</a> theme to generate our docs.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
</body>
</html>