create-kaixa
Version:
Katalon Studio wrapper to make manual test writing much easier.
3,605 lines (953 loc) • 171 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#genTextOfLength">genTextOfLength</a></li><li data-type='method'><a href="Kaixa.html#genTextOfLength">genTextOfLength</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#getDefaultAppName">getDefaultAppName</a></li><li data-type='method'><a href="Kaixa.html#getDefaultCourseId">getDefaultCourseId</a></li><li data-type='method'><a href="Kaixa.html#getDefaultHost">getDefaultHost</a></li><li data-type='method'><a href="Kaixa.html#getDefaultProtocol">getDefaultProtocol</a></li><li data-type='method'><a href="Kaixa.html#getDependentProfileValue">getDependentProfileValue</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#getSpecialChars">getSpecialChars</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#hasProfileValue">hasProfileValue</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#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>