Commit 583868d9 583868d9299ee497244533bd1ff98c56b0e74793 by Nicolas Perriault

jsdoc

1 parent ccb37505
1 Subproject commit 2ef75dfab7bbf7c42706a11ba8ddb3497b923792 1 Subproject commit 03a0fac7329753f0b25bfe10d517fb214de479d0
......
...@@ -256,7 +256,7 @@ Casper.prototype.capture = function capture(targetFile, clipRect) { ...@@ -256,7 +256,7 @@ Casper.prototype.capture = function capture(targetFile, clipRect) {
256 * `xbm` and `xpm`. 256 * `xbm` and `xpm`.
257 * 257 *
258 * @param String format The image format 258 * @param String format The image format
259 * @param String|Object|undefined selector CSS3 selector or clipRect object (optional) 259 * @param String|Object|undefined selector DOM CSS3/XPath selector or clipRect object (optional)
260 * @return Casper 260 * @return Casper
261 */ 261 */
262 Casper.prototype.captureBase64 = function captureBase64(format, area) { 262 Casper.prototype.captureBase64 = function captureBase64(format, area) {
...@@ -299,7 +299,7 @@ Casper.prototype.captureBase64 = function captureBase64(format, area) { ...@@ -299,7 +299,7 @@ Casper.prototype.captureBase64 = function captureBase64(format, area) {
299 * Captures the page area matching the provided selector. 299 * Captures the page area matching the provided selector.
300 * 300 *
301 * @param String targetFile Target destination file path. 301 * @param String targetFile Target destination file path.
302 * @param String selector CSS3 selector 302 * @param String selector DOM CSS3/XPath selector
303 * @return Casper 303 * @return Casper
304 */ 304 */
305 Casper.prototype.captureSelector = function captureSelector(targetFile, selector) { 305 Casper.prototype.captureSelector = function captureSelector(targetFile, selector) {
...@@ -563,10 +563,10 @@ Casper.prototype.evaluateOrDie = function evaluateOrDie(fn, message) { ...@@ -563,10 +563,10 @@ Casper.prototype.evaluateOrDie = function evaluateOrDie(fn, message) {
563 }; 563 };
564 564
565 /** 565 /**
566 * Checks if an element matching the provided CSS3 selector exists in 566 * Checks if an element matching the provided DOM CSS3/XPath selector exists in
567 * current page DOM. 567 * current page DOM.
568 * 568 *
569 * @param String selector A CSS3 selector 569 * @param String selector A DOM CSS3/XPath selector
570 * @return Boolean 570 * @return Boolean
571 */ 571 */
572 Casper.prototype.exists = function exists(selector) { 572 Casper.prototype.exists = function exists(selector) {
...@@ -593,7 +593,7 @@ Casper.prototype.exit = function exit(status) { ...@@ -593,7 +593,7 @@ Casper.prototype.exit = function exit(status) {
593 * Fetches innerText within the element(s) matching a given CSS3 593 * Fetches innerText within the element(s) matching a given CSS3
594 * selector. 594 * selector.
595 * 595 *
596 * @param String selector A CSS3 selector 596 * @param String selector A DOM CSS3/XPath selector
597 * @return String 597 * @return String
598 */ 598 */
599 Casper.prototype.fetchText = function fetchText(selector) { 599 Casper.prototype.fetchText = function fetchText(selector) {
...@@ -606,7 +606,7 @@ Casper.prototype.fetchText = function fetchText(selector) { ...@@ -606,7 +606,7 @@ Casper.prototype.fetchText = function fetchText(selector) {
606 /** 606 /**
607 * Fills a form with provided field values. 607 * Fills a form with provided field values.
608 * 608 *
609 * @param String selector A CSS3 selector to the target form to fill 609 * @param String selector A DOM CSS3/XPath selector to the target form to fill
610 * @param Object vals Field values 610 * @param Object vals Field values
611 * @param Boolean submit Submit the form? 611 * @param Boolean submit Submit the form?
612 */ 612 */
...@@ -706,11 +706,12 @@ Casper.prototype.getCurrentUrl = function getCurrentUrl() { ...@@ -706,11 +706,12 @@ Casper.prototype.getCurrentUrl = function getCurrentUrl() {
706 }; 706 };
707 707
708 /** 708 /**
709 * Retrieves the value of an attribute on the first element matching the provided CSS3 selector. 709 * Retrieves the value of an attribute on the first element matching the provided
710 * DOM CSS3/XPath selector.
710 * 711 *
711 * @param String selector A CSS3 selector 712 * @param String selector A DOM CSS3/XPath selector
712 * @param String attribute The attribute to lookup 713 * @param String attribute The attribute name to lookup
713 * @return String The requested DOM element 714 * @return String The requested DOM element attribute value
714 */ 715 */
715 Casper.prototype.getElementAttribute = Casper.prototype.getElementAttr = function getElementAttr(selector, attribute) { 716 Casper.prototype.getElementAttribute = Casper.prototype.getElementAttr = function getElementAttr(selector, attribute) {
716 "use strict"; 717 "use strict";
...@@ -720,9 +721,9 @@ Casper.prototype.getElementAttribute = Casper.prototype.getElementAttr = functio ...@@ -720,9 +721,9 @@ Casper.prototype.getElementAttribute = Casper.prototype.getElementAttr = functio
720 }; 721 };
721 722
722 /** 723 /**
723 * Retrieves boundaries for a DOM element matching the provided CSS3 selector. 724 * Retrieves boundaries for a DOM element matching the provided DOM CSS3/XPath selector.
724 * 725 *
725 * @param String selector A CSS3 selector 726 * @param String selector A DOM CSS3/XPath selector
726 * @return Object 727 * @return Object
727 */ 728 */
728 Casper.prototype.getElementBounds = function getElementBounds(selector) { 729 Casper.prototype.getElementBounds = function getElementBounds(selector) {
...@@ -1309,11 +1310,11 @@ Casper.prototype.viewport = function viewport(width, height) { ...@@ -1309,11 +1310,11 @@ Casper.prototype.viewport = function viewport(width, height) {
1309 }; 1310 };
1310 1311
1311 /** 1312 /**
1312 * Checks if an element matching the provided CSS3 selector is visible 1313 * Checks if an element matching the provided DOM CSS3/XPath selector is visible
1313 * current page DOM by checking that offsetWidth and offsetHeight are 1314 * current page DOM by checking that offsetWidth and offsetHeight are
1314 * both non-zero. 1315 * both non-zero.
1315 * 1316 *
1316 * @param String selector A CSS3 selector 1317 * @param String selector A DOM CSS3/XPath selector
1317 * @return Boolean 1318 * @return Boolean
1318 */ 1319 */
1319 Casper.prototype.visible = function visible(selector) { 1320 Casper.prototype.visible = function visible(selector) {
...@@ -1443,10 +1444,10 @@ Casper.prototype.waitForResource = function waitForResource(test, then, onTimeou ...@@ -1443,10 +1444,10 @@ Casper.prototype.waitForResource = function waitForResource(test, then, onTimeou
1443 }; 1444 };
1444 1445
1445 /** 1446 /**
1446 * Waits until an element matching the provided CSS3 selector exists in 1447 * Waits until an element matching the provided DOM CSS3/XPath selector exists in
1447 * remote DOM to process a next step. 1448 * remote DOM to process a next step.
1448 * 1449 *
1449 * @param String selector A CSS3 selector 1450 * @param String selector A DOM CSS3/XPath selector
1450 * @param Function then The next step to perform (optional) 1451 * @param Function then The next step to perform (optional)
1451 * @param Function onTimeout A callback function to call on timeout (optional) 1452 * @param Function onTimeout A callback function to call on timeout (optional)
1452 * @param Number timeout The max amount of time to wait, in milliseconds (optional) 1453 * @param Number timeout The max amount of time to wait, in milliseconds (optional)
...@@ -1461,10 +1462,10 @@ Casper.prototype.waitForSelector = function waitForSelector(selector, then, onTi ...@@ -1461,10 +1462,10 @@ Casper.prototype.waitForSelector = function waitForSelector(selector, then, onTi
1461 }; 1462 };
1462 1463
1463 /** 1464 /**
1464 * Waits until an element matching the provided CSS3 selector does not 1465 * Waits until an element matching the provided DOM CSS3/XPath selector does not
1465 * exist in the remote DOM to process a next step. 1466 * exist in the remote DOM to process a next step.
1466 * 1467 *
1467 * @param String selector A CSS3 selector 1468 * @param String selector A DOM CSS3/XPath selector
1468 * @param Function then The next step to perform (optional) 1469 * @param Function then The next step to perform (optional)
1469 * @param Function onTimeout A callback function to call on timeout (optional) 1470 * @param Function onTimeout A callback function to call on timeout (optional)
1470 * @param Number timeout The max amount of time to wait, in milliseconds (optional) 1471 * @param Number timeout The max amount of time to wait, in milliseconds (optional)
...@@ -1479,10 +1480,10 @@ Casper.prototype.waitWhileSelector = function waitWhileSelector(selector, then, ...@@ -1479,10 +1480,10 @@ Casper.prototype.waitWhileSelector = function waitWhileSelector(selector, then,
1479 }; 1480 };
1480 1481
1481 /** 1482 /**
1482 * Waits until an element matching the provided CSS3 selector is 1483 * Waits until an element matching the provided DOM CSS3/XPath selector is
1483 * visible in the remote DOM to process a next step. 1484 * visible in the remote DOM to process a next step.
1484 * 1485 *
1485 * @param String selector A CSS3 selector 1486 * @param String selector A DOM CSS3/XPath selector
1486 * @param Function then The next step to perform (optional) 1487 * @param Function then The next step to perform (optional)
1487 * @param Function onTimeout A callback function to call on timeout (optional) 1488 * @param Function onTimeout A callback function to call on timeout (optional)
1488 * @param Number timeout The max amount of time to wait, in milliseconds (optional) 1489 * @param Number timeout The max amount of time to wait, in milliseconds (optional)
...@@ -1497,10 +1498,10 @@ Casper.prototype.waitUntilVisible = function waitUntilVisible(selector, then, on ...@@ -1497,10 +1498,10 @@ Casper.prototype.waitUntilVisible = function waitUntilVisible(selector, then, on
1497 }; 1498 };
1498 1499
1499 /** 1500 /**
1500 * Waits until an element matching the provided CSS3 selector is no 1501 * Waits until an element matching the provided DOM CSS3/XPath selector is no
1501 * longer visible in remote DOM to process a next step. 1502 * longer visible in remote DOM to process a next step.
1502 * 1503 *
1503 * @param String selector A CSS3 selector 1504 * @param String selector A DOM CSS3/XPath selector
1504 * @param Function then The next step to perform (optional) 1505 * @param Function then The next step to perform (optional)
1505 * @param Function onTimeout A callback function to call on timeout (optional) 1506 * @param Function onTimeout A callback function to call on timeout (optional)
1506 * @param Number timeout The max amount of time to wait, in milliseconds (optional) 1507 * @param Number timeout The max amount of time to wait, in milliseconds (optional)
......