Skip to content

Commit

Permalink
doc and examples update
Browse files Browse the repository at this point in the history
  • Loading branch information
sebv committed Nov 13, 2013
1 parent cf40e94 commit 9f6da7f
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 82 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,6 @@ To update the mappings run the following commands:
make mapping > doc/api.md
make full_mapping > doc/jsonwire-full-mapping.md
make unsupported_mapping > doc/jsonwire-unsupported-mapping.md

```
## Publishing
Expand Down
28 changes: 0 additions & 28 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1052,22 +1052,6 @@ as in waitForElement.<br>
extra
</td>
<td style="border: 1px solid #ccc; padding: 5px;">
waitForVisibleByClassName(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByCssSelector(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleById(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByName(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByLinkText(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByPartialLinkText(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByTagName(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByXPath(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByCss(value, timeout, cb) -&gt; cb(err)<br>
</td>
</tr>
<tr>
<td style="border: 1px solid #ccc; padding: 5px;">
extra
</td>
<td style="border: 1px solid #ccc; padding: 5px;">
isVisible(element , cb) -&gt; cb(err, boolean)<br>
isVisible(queryType, querySelector, cb) -&gt; cb(err, boolean)<br>
</td>
Expand Down Expand Up @@ -1096,18 +1080,6 @@ uploadFile(filepath, cb) -&gt; cb(err, filepath)<br>
extra
</td>
<td style="border: 1px solid #ccc; padding: 5px;">
Waits for JavaScript condition to be true (polling within wd client):<br>
waitForJsCondition(jsConditionExpr, timeout, pollFreq, cb) -&gt; cb(err, boolean)<br>
timeout and pollFreq optional, default are 1000/200<br>
jsConditionExpr: condition expression, should return a boolean<br>
return true if condition satisfied, error otherwise.<br>
</td>
</tr>
<tr>
<td style="border: 1px solid #ccc; padding: 5px;">
extra
</td>
<td style="border: 1px solid #ccc; padding: 5px;">
Waits for JavaScript condition to be true (async script polling within browser):<br>
waitForConditionInBrowser(conditionExpr, timeout, pollFreq, cb) -&gt; cb(err, boolean) <br>
conditionExpr: condition expression, should return a boolean<br>
Expand Down
28 changes: 0 additions & 28 deletions doc/jsonwire-full-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -1259,22 +1259,6 @@ as in waitForElement.<br>
extra
</td>
<td style="border: 1px solid #ccc; padding: 5px;">
waitForVisibleByClassName(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByCssSelector(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleById(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByName(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByLinkText(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByPartialLinkText(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByTagName(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByXPath(value, timeout, cb) -&gt; cb(err)<br>
waitForVisibleByCss(value, timeout, cb) -&gt; cb(err)<br>
</td>
</tr>
<tr>
<td style="border: 1px solid #ccc; padding: 5px;">
extra
</td>
<td style="border: 1px solid #ccc; padding: 5px;">
isVisible(element , cb) -&gt; cb(err, boolean)<br>
isVisible(queryType, querySelector, cb) -&gt; cb(err, boolean)<br>
</td>
Expand Down Expand Up @@ -1303,18 +1287,6 @@ uploadFile(filepath, cb) -&gt; cb(err, filepath)<br>
extra
</td>
<td style="border: 1px solid #ccc; padding: 5px;">
Waits for JavaScript condition to be true (polling within wd client):<br>
waitForJsCondition(jsConditionExpr, timeout, pollFreq, cb) -&gt; cb(err, boolean)<br>
timeout and pollFreq optional, default are 1000/200<br>
jsConditionExpr: condition expression, should return a boolean<br>
return true if condition satisfied, error otherwise.<br>
</td>
</tr>
<tr>
<td style="border: 1px solid #ccc; padding: 5px;">
extra
</td>
<td style="border: 1px solid #ccc; padding: 5px;">
Waits for JavaScript condition to be true (async script polling within browser):<br>
waitForConditionInBrowser(conditionExpr, timeout, pollFreq, cb) -&gt; cb(err, boolean) <br>
conditionExpr: condition expression, should return a boolean<br>
Expand Down
5 changes: 0 additions & 5 deletions examples/promise/add-method-async.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//
// It is now possible to monkey patch using promise returning functions instead.
//

require('colors');
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
Expand All @@ -18,7 +14,6 @@ try {
// enables chai assertion chaining
chaiAsPromised.transferPromiseness = wd.transferPromiseness;

// Monkey patching need to be implemented before creating the browser.
wd.addAsyncMethod(
'elementByCssSelectorWhenReady',
function(selector, timeout/*, cb*/) {
Expand Down
4 changes: 2 additions & 2 deletions examples/promise/wait-for.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var textInclude = function(text) {
);
};

// optional monkey patching
// optional add custom method
wd.PromiseChainWebdriver.prototype.waitForElementWithTextByCss = function(selector, timeout, pollFreq) {
return this
.waitForElementByCss(selector, textNonEmpty , timeout, pollFreq);
Expand Down Expand Up @@ -123,7 +123,7 @@ browser
.waitFor(asserters.jsCondition('$("#i_am_an_id .child")? true: false') , 2000)
.should.eventually.be.ok

// monkey patched method
// custom method
.execute(removeChildren)
.execute( appendChild, [500] )
.waitForElementWithTextByCss("#i_am_an_id .child", 2000)
Expand Down
18 changes: 0 additions & 18 deletions lib/webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1432,17 +1432,6 @@ webdriver.prototype._buildBySuffixMethods = function(type, prototype, singular,
this._waitForElement.apply(this, args);
};

/**
* waitForVisibleByClassName(value, timeout, cb) -> cb(err)
* waitForVisibleByCssSelector(value, timeout, cb) -> cb(err)
* waitForVisibleById(value, timeout, cb) -> cb(err)
* waitForVisibleByName(value, timeout, cb) -> cb(err)
* waitForVisibleByLinkText(value, timeout, cb) -> cb(err)
* waitForVisibleByPartialLinkText(value, timeout, cb) -> cb(err)
* waitForVisibleByTagName(value, timeout, cb) -> cb(err)
* waitForVisibleByXPath(value, timeout, cb) -> cb(err)
* waitForVisibleByCss(value, timeout, cb) -> cb(err)
*/
prototype['waitForVisible' + utils.elFuncSuffix(type)] = function() {
var args = __slice.call(arguments, 0);
args.unshift(utils.elFuncFullType(type));
Expand Down Expand Up @@ -2308,13 +2297,6 @@ webdriver.prototype.uploadFile = function(filepath) {
});
};

/**
* Waits for JavaScript condition to be true (polling within wd client):
* waitForJsCondition(jsConditionExpr, timeout, pollFreq, cb) -> cb(err, boolean)
* timeout and pollFreq optional, default are 1000/200
* jsConditionExpr: condition expression, should return a boolean
* return true if condition satisfied, error otherwise.
*/
webdriver.prototype.waitForJsCondition = function(){
deprecator.warn('waitForJsCondition',
'waitForJsCondition has been deprecated, use waitFor + jsCondition asserter instead.');
Expand Down

0 comments on commit 9f6da7f

Please sign in to comment.