webdriverio-boneyard / wdio-sync Goto Github PK
View Code? Open in Web Editor NEWA WebdriverIO v4 plugin. Helper module to run WebdriverIO commands synchronously.
Home Page: http://v4.webdriver.io
License: MIT License
A WebdriverIO v4 plugin. Helper module to run WebdriverIO commands synchronously.
Home Page: http://v4.webdriver.io
License: MIT License
see webdriverio/webdriverio#1343
It should mark test as pending
Branch | Build failing ๐จ |
---|---|
Dependency | eslint |
Current Version | 4.7.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As eslint is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
The new version differs by 4 commits.
2f064d9
4.7.1
0d0bd7b
Build: changelog update for 4.7.1
08656db
Fix: Handle nested disable directive correctly (fixes #9318) (#9322)
9226495
Revert "Chore: rewrite parseListConfig for a small perf gain." (#9325)
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | sinon |
Current Version | 4.0.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As sinon is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
The new version differs by 16 commits.
ec9126c
Update docs/changelog.md and set new release id in docs/_config.yml
1222a0f
Add release documentation for v4.0.1
1bf1f2d
4.0.1
1545c26
Update History.md and AUTHORS for new release
e9fab2d
Merge pull request #1579 from fatso83/upgrade-deps
f2252b4
Upgrade nise and lolex versions
d81a937
Fix doc typo: scenarious -> scenarios
af3a645
Merge pull request #1577 from evan-007/fix_doc_typo
7c9c881
Remove extra backtick from fake-xhr-and-server docs
cf9bf05
Merge pull request #1575 from mroderick/tidy-up-docs
2e8abad
Remove obsoleted lib/sinon/sandbox-stub.js
28e70d1
Use an include for migration guides
3c68adc
Move migration guides to new section
6197ff3
Merge pull request #1565 from fatso83/patch-docs
dfb9ee6
Add migration guide for 4.0
There are 16 commits in total.
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
Hello,
When retrieving the last version of this package through NPM, we don't have the [email protected]
"dependencies": {
"babel-runtime": "6.23.0",
"fibers": "~1.0.15",
"object.assign": "^4.0.3"
},
Do I do something wrong or should a new version be uploaded to NPM?
Thanks
If I understand the code correctly, hooks won't get run around async commands.
wrapCommand
is basically the identity function for async commands: https://github.com/webdriverio/wdio-sync/blob/master/index.js#L153
But for sync commands it calls hooks:
https://github.com/webdriverio/wdio-sync/blob/master/index.js#L199
Is this right? I'm trying to work on an async-only version, and this seemed odd to me.
Branch | Build failing ๐จ |
---|---|
Dependency | mocha |
Current Version | 3.5.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mocha is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | should |
Current Version | 13.1.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
should is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
Fix #157
The new version differs by 5 commits.
cc2f68b
Release 13.1.3
76ed8ce
Merge pull request #160 from shouldjs/deps
1e7b1d0
Merge pull request #159 from shouldjs/fix-157
82c1683
Update deps
6a7989f
Fix #157
See the full diff
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | eslint |
Current Version | 4.8.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
lines-around-comment
(fixes #8564) (#8565) (Ed Lee)The new version differs by 32 commits.
235c7dd
4.9.0
b6f31a9
Build: changelog update for 4.9.0
85388fb
Fix: Correct error and test messages to fit config search path (#9428)
62a323c
Fix: Add class options for lines-around-comment
(fixes #8564) (#8565)
8eb4aae
New: multiline-comment-style rule (fixes #8320) (#9389)
db41408
Chore: avoid applying eslint-env comments twice (#9278)
febb897
Chore: avoid loose equality assertions (#9415)
2247efa
Update: Add FunctionExpression to require-jsdoc (fixes #5867) (#9395)
6791d18
Docs: Corrected noun to verb. (#9438)
b02fbb6
Update: custom messages for no-restricted-* (refs #8400)
02732bd
Docs: Reorganized to avoid misunderstandings. (#9434)
d9466b8
Docs: Correct time forecast for tests. (#9432)
f7ed84f
Docs: Add instruction re home-directory config files (refs #7729) (#9426)
30d018b
Chore: Add Aladdin-ADD & VictorHom to README (#9424)
2d8a303
Docs: fix examples for prefer-numeric-literals (#9155)
There are 32 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
Return value of saveScreenshot (Buffer) is incorrect due to adding an object to the prototype chain via Object.create. This makes all the native methods on Buffer fail, including the writeFileSync example in the docs. Adding Buffer.isBuffer(result) to the early-return condition fixes this case, though avoiding Object.create might be more robust. :-p
See webdriverio-boneyard/wdio-mocha-framework#6
Example:
// ...but this fails with `AssertionError: expected 0 to be above 990` (i.e. it doesn't wait):
browser.addCommand('customWrapWdio', function async (a) {
return browser.customWdio(a)
.then((b) => {
return b + 1
})
})
Hi,
we are using "wdio-sync" 0.4.8 combined with jasmine testrunner and the junit-reporter.
We've become aware of the following problem:
If some (waitFor) timeout occurs in a test suite, the exception is logged to stdout but not catched in "wdio-sync" and not catched in jasmine or wdio too.
So the junit report doesn't notice of those failed test-cases! Only the number of executed tests is reduced by errors / fails.
Furthermore none of the following test-cases is executed.
So we've debugged wdio-sync to find some "breadcrumbs", leading us to the source of this problem.
We've changed the wdio-sync/index.js for debugging purposes from (line 336):
return origFn(specTitle, function (done) {
Fiber(() => {
**specFn.call(this)
done()**
}).run()
})
to:
return origFn(specTitle, function (done) {
Fiber(() => {
**try{
specFn.call(this)
done()
}catch(e){
done.fail(e)
}**
}).run()
})
This solves the problem.
While debugging the "wdio-sync" code we found some similar places, where "done" function is passed as an error callback parameter:
For instance line 359 in wdio-sync/index.js:
}).then(() => done(), **done**)
Is that running for jasmine?!?
We think there must be passed the done.fail function.
Best regards
Dominic Graulich
Branch | Build failing ๐จ |
---|---|
Dependency | eslint |
Current Version | 4.6.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As eslint is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
node.parent
is already set (fixes #9122) (#9283) (Teddy Katz)return
(fixes #9285) (#9296) (Teddy Katz)npm run perf
description (#9274) (Teddy Katz)The new version differs by 55 commits.
439e8e6
4.7.0
2ec62f9
Build: changelog update for 4.7.0
787b78b
Upgrade: Espree v3.5.1 (fixes #9153) (#9314)
1488b51
Update: run rules after node.parent
is already set (fixes #9122) (#9283)
4431d68
Docs: fix wrong config in max-len example. (#9309)
9d1df92
Chore: Revert "avoid handling Rules instances in config-validator" (#9295)
7d24dde
Docs: Fix code snippet to refer to the correct option (#9313)
12388d4
๏ฟฝChore: rewrite parseListConfig for a small perf gain. (#9300)
ce1f084
Update: fix MemberExpression handling in no-extra-parens (fixes #9156)
0c720a3
Update: allow autofixing when using processors (fixes #7510) (#9090)
838df76
Chore: upgrade deps. (#9289)
f12def6
Update: indent flatTernary option to handle return
(fixes #9285) (#9296)
e220687
Fix: remove autofix for var undef inits (fixes #9231) (#9288)
002e199
Docs: fix no-restricted-globals wrong config. (#9305)
fcfe91a
Docs: fix wrong config in id-length example. (#9303)
There are 55 commits in total.
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
From @monolithed on January 25, 2017 10:54
test.js
let page = require('./page');
describe('test', () => {
it('test', () => page());
});
page.js
module.exports = () => {
browser.url('https://e.mail.ru/login');
browser.alertText();
};
[chrome #0-0] Session ID: ec6a556d-0074-4b8d-9f28-537090c1fd7d
[chrome #0-0] Spec: /test.js
[chrome #0-0] Running: chrome
[chrome #0-0]
[chrome #0-0] test
[chrome #0-0]
[chrome #0-0] test
[chrome #0-0] 1) test
[chrome #0-0]
[chrome #0-0]
[chrome #0-0] 1 failing (6s)
[chrome #0-0]
[chrome #0-0] 1) test test:
[chrome #0-0] Timeout of 3000ms exceeded. Try to reduce the run time or increase your timeout for test specs (http://webdriver.io/guide/testrunner/timeouts.html); if returning a Promise, ensure it resolves.
[chrome #0-0] Error: Timeout of 3000ms exceeded. Try to reduce the run time or increase your timeout for test specs (http://webdriver.io/guide/testrunner/timeouts.html); if returning a Promise, ensure it resolves.
[chrome #0-0] at Timeout.<anonymous> (/node_modules/mocha/lib/runnable.js:232:19)
[chrome #0-0] at ontimeout (timers.js:365:14)
[chrome #0-0] at tryOnTimeout (timers.js:237:5)
[chrome #0-0] at Timer.listOnTimeout (timers.js:207:5)
[chrome #0-0]
[chrome #0-0] Session ID: ec6a556d-0074-4b8d-9f28-537090c1fd7d
[chrome #0-0] Spec: /tests/1788/test.js
[chrome #0-0] Running: chrome
[chrome #0-0]
[chrome #0-0] test
[chrome #0-0]
[chrome #0-0] test
[chrome #0-0] 1) test
[chrome #0-0]
[chrome #0-0]
[chrome #0-0] 1 failing (6s)
[chrome #0-0]
[chrome #0-0] 1) test test:
[chrome #0-0] Something about its real error and place
[chrome #0-0] at module.exports (/page.js:3:8)
[chrome #0-0] at Context.it (/test.js:4:19)
assert(0, 'Something went wrong');
[chrome #0-0] Something went wrong
[chrome #0-0] AssertionError: Something went wrong
[chrome #0-0] at module.exports (/page.js:6:2)
[chrome #0-0] at Context.it (/test.js:4:19)
[chrome #0-0]
throw new Error('Something went wrong');
[chrome #0-0] Something went wrong
[chrome #0-0] at module.exports (/page.js:3:8)
[chrome #0-0] at Context.it (/test.js:4:19)
[chrome #0-0]
browser.alertText();
[chrome #0-0] at Timeout.<anonymous> (/tests/1788/node_modules/mocha/lib/runnable.js:232:19)
[chrome #0-0] at ontimeout (timers.js:365:14)
[chrome #0-0] at tryOnTimeout (timers.js:237:5)
[chrome #0-0] at Timer.listOnTimeout (timers.js:207:5)
Copied from original issue: webdriverio/webdriverio#1842
Branch | Build failing ๐จ |
---|---|
Dependency | mocha |
Current Version | 4.0.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 6 commits.
eb8bf8d
Release v4.0.1
3b485ea
update CHANGELOG.md for v4.0.1 [ci skip]
96e5c1a
upgrade eslint to v4.8.0
d7cff37
Update growl to 1.10.3
0cdd921
remove preversion script; test on publish; closes #2999
f49c0ce
Fix changelog issues/pr URLs (#3047)
See the full diff
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | mocha |
Current Version | 3.5.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mocha is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
xit
export for "require" interface (@solodynamo)--compilers
coverage (@ScottFreeCode)The new version differs by 14 commits.
4070a44
Release v3.5.1
466ba73
update CHANGELOG.md for v3.5.1 [ci skip]
1cc0fc0
import/require xit, fixes #2972
74fa66f
update nyc to latest; remove workaround in travis script
aa52933
update coveralls strategy; closes #2984
73a5338
Spelling (#2981)
9f403bf
Add utils.escape
tests and fix unicode escaping
800acbc
whitelist "developer-experience" tag for stalebot [ci skip]
5895671
Added issue, pull request templates. (#2869)
075bd51
Merge pull request #2918 from mochajs/no-shell-test
8710438
Work around Node 0.10 Windows flake when testing
13b8340
Ensure that compiler lookup works and not just that transpilation works (#2922)
26d337a
Add tests for double-star behavior
c0e6b68
Eliminate glob.sh
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
Array.prototype.includes
is not supported in a couple of nodejs versions. We need to add a polyfil
Branch | Build failing ๐จ |
---|---|
Dependency | eslint-plugin-node |
Current Version | 5.2.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
eslint-plugin-node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 3 commits.
ad1f15a
5.2.1
2aaa994
Fix: support negative patterns in files field
155f714
Chore: fix a small misspelling. (#95)
See the full diff
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | eslint-plugin-node |
Current Version | 5.1.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As eslint-plugin-node is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
no-deprecated-api
that has overlooked GLOBAL
and root
global variables which are deprecated in Node.js 6.0.0. (#92)The new version differs by 5 commits.
7189722
5.2.0
e7878e9
Update: fix missing deprecated APIs in v6 (fixes #92)
52ceb11
Chore: rm superfluous argument. (#93)
69dc50a
Chore: update .travis.yml
effdd10
Fix: fix tests for linter.reset
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | eslint |
Current Version | 4.9.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
npm run check-commit
script (#9513) (Teddy Katz).md
to link (for github users) (#9501) (่ๅฎ่ฐ็็ซ)npm run profile
script (fixes #9397) (#9455) (Teddy Katz)The new version differs by 38 commits.
9deb1b1
4.10.0
6d19001
Build: changelog update for 4.10.0
bb6e60a
Fix: Improve the doc for no-restricted-modules rule (fixes #9437) (#9495)
c529de9
Docs: Amend rule document to correct and complete it (refs #6251). (#9498)
f9c6673
Chore: Add tests to cover array and object values and leading commas. (#9502)
9169258
Chore: remove npm run check-commit
script (#9513)
7d390b2
Docs: Revise contributor documentation on issue labels. (#9469)
d80b9d0
Fix: no-var don't fix globals (fixes #9520) (#9525)
b8aa071
Fix: allow linting the empty string from stdin (fixes #9515) (#9517)
350a72c
Chore: regex.test => string.startsWith (#9518)
de0bef4
Chore: remove obsolete eslintbot templates (#9512)
720b6d5
Docs: Update ISSUE_TEMPLATE.md (#9504)
2fa64b7
Fix: should not convert non-consecutive line comments to a single bloโฆ (#9475)
9725146
Fix: multiline-comment-style fix produces invalid code (fixes #9461). (#9463)
b12cff8
Fix: Expected order of jsdoc tags (fixes #9412) (#9451)
There are 38 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | eslint-plugin-promise |
Current Version | 3.5.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
eslint-plugin-promise is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | np |
Current Version | 2.16.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
np is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 4 commits.
b6c7a91
2.16.1
bc0b536
Freeze rxjs
version (#195)
0e89383
Try out CodeSponsor
8613ba4
Add signed Git tag instructions for Yarn (#172)
See the full diff
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
I use selenium automation scripts written in webdriverio where it runs a few commands and it stops waiting for all elements (in a CSS selector) to disappear. This used to randomly kill my node process with UnhandledPromiseRejection
and no stacktrace, I couldn't make headway in fixing this error at all and used to encounter it every few minutes and I used to restart my wdio tests. Now I've gotten the stacktrace, I'm posting it while I myself investigate this further.
This code got me the stacktrace
process.on('unhandledRejection', function(err, promise) {
console.error('Unhandled rejection (promise: ', promise, ', reason: ', err, ').');
});
Unhandled rejection (promise: Promise {
<rejected> TypeError: Cannot read property 'ELEMENT' of undefined
at is$$Result (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\wdio-
sync\build\index.js:348:63)
at Object.applyPrototype (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_mo
dules\wdio-sync\build\index.js:363:199)
at Object.<anonymous> (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modul
es\wdio-sync\build\index.js:322:63)
at Object.exec (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\webd
riverio\build\lib\helpers\safeExecute.js:28:24)
at Object.resolve (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\w
ebdriverio\build\lib\webdriverio.js:193:29)
at C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\webdriverio\build
\lib\webdriverio.js:503:32
at _fulfilled (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\q\q.j
s:834:54)
at self.promiseDispatch.done (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\nod
e_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-ne
db\node_modules\q\q.js:796:13)
at C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\q\q.js:604:44 } ,
reason: TypeError: Cannot read property 'ELEMEN
T' of undefined
at is$$Result (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\wdio-
sync\build\index.js:348:63)
at Object.applyPrototype (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_mo
dules\wdio-sync\build\index.js:363:199)
at Object.<anonymous> (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modul
es\wdio-sync\build\index.js:322:63)
at Object.exec (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\webd
riverio\build\lib\helpers\safeExecute.js:28:24)
at Object.resolve (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\w
ebdriverio\build\lib\webdriverio.js:193:29)
at C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\webdriverio\build
\lib\webdriverio.js:503:32
at _fulfilled (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\q\q.j
s:834:54)
at self.promiseDispatch.done (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\nod
e_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\my-home\AutomationProjects\WebdriverioProjects\chimp-ne
db\node_modules\q\q.js:796:13)
at C:\my-home\AutomationProjects\WebdriverioProjects\chimp-nedb\node_modules\q\q.js:604:44 ).
From @gregorskii on October 26, 2016 21:48
When querying for elements via client.elements()
in sync mode the response includes a WebDriver JSON object that contains a field values
as an array. Each element of this array does not have the prototype methods .click .isVisible etc. There is also no way to query the DOM for the original WebDriver JSON element via the ID returned by the elements call.
When querying the DOM for elements through a selector the Webdriver JSON Object returned includes an array in its values field:
{ sessionId: '4a8763ec-9c6e-42c1-90a9-e64a2508c0d6',
state: 'success',
value: [ { ELEMENT: '204' } ],
class: 'org.openqa.selenium.remote.Response',
hCode: 886205991,
selector: 'SELECTOR',
_status: 0 }
There is not currently a way to use the prototype methods .click(), .element(), .elements() etc directly with a single item in the array. The docs state that these prototype methods will apply to the first element in the array, an example of which is click:
element to click on. If it matches with more than one DOM-element it automatically clicks on the first element
There are convenience methods to do these actions against an ELEMENT ID in the DOM via the elementIDMETHOD
functions ex click.
However under certain use cases it would be helpful to have the ability to have the prototype methods applied to each element in the array, or to be able to query the DOM by ID and get the prototype methods.
An example use case of this would be in a map method after a elements query:
Direct form:
const items = this.instance.elements('SELECTOR');
return items.value.each((element) => {
element.elements('a').isVisible();
// ... any other actions against this element
});
Function form:
const items = this.instance.elements('SELECTOR');
return items.value.map((webJSONElement) => {
return webJSONElement.ELEMENT;
}).each((id) => {
const element = client.elementID(id);
element.elements('a').isVisible();
// ... any other actions against this element
});
This functionality is being used primarily with ChimpJS which uses a sync form of Webdriverio, or forces it to be sync.
Copied from original issue: webdriverio/webdriverio#1672
In theory you should be able to call brower.debug() to manually inspect the browser state continue when you are ready by pressing enter at the console.
This works fine using the async api in a standalone js file, but calling debug in a test runner will timeout and fail the test without waiting for user to press enter at the console.
http://webdriver.io/api/utility/debug.html
Is there a way to prevent this command from timing out?
Branch | Build failing ๐จ |
---|---|
Dependency | eslint-plugin-import |
Current Version | 2.7.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
eslint-plugin-import is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 35 commits.
95b1ba6
disable AppVeyor coveralls
4071379
#842/#944 changelog note
8702af7
#744 changelog note
91c5318
#886 / #891 changelog notes
1b3f544
bump v2.8.0
cef88f2
Merge pull request #944 from alexgorbatchev/alexgorbatchev/issue-842
c246b9e
#842 Fixes Cannot read property 'some' of undefined
1958e0b
[Tests] fix broken test on master
68f63f5
forgot @k15a's user link ๐
5f5fbf6
changelog notes for #620 + #632
92dd662
Merge pull request #632 from k15a/master
1ba1c3a
removing changelog note, will re-add
146f87f
changelog notes for #720 + #858
57527c7
Merge pull request #858 from laysent/master
006ddeb
Merge remote-tracking branch 'refs/remotes/benmosher/master'
There are 35 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | should |
Current Version | 13.1.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
should is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | mocha |
Current Version | 3.5.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mocha is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
The new version differs by 5 commits.
72622ab
Release v3.5.2
ac4c39f
fix version in CHANGELOG.md [ci skip]
f06d969
update CHANGELOG for 3.5.2 [ci skip]
9a3ddeb
fix AMD bundle by hacking around check in he
module; closes #3000
337d317
fix broken links in CHANGELOG.md [ci skip]
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | sinon |
Current Version | 4.0.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 22 commits.
c0a71c6
Update docs/changelog.md and set new release id in docs/_config.yml
a2b873a
Add release documentation for v4.1.0
0a6a660
4.1.0
3b36972
Update History.md and AUTHORS for new release
201a652
Issue 1598 (Feature Request): Implemented sandbox.createStubInstance, tests, and documentation.
d49180d
Merge pull request #1603 from mroderick/fix-more-markdown
2d2631c
Docs: fix pre commit hook
9fa87e7
Docs: remove trailing quote from heading
46ffad3
Docs: verify documentation using markdownlint
aa10bb7
Docs: remove use of element
294ada0
Docs: remove use of
tag
77e5d31
Docs: reduce unnecessary inline HTML
b14a261
Docs: fix invalid syntax of backticks in headers
579e029
Docs: fix trailing punctuation in headers
7b04012
Docs: remove extraneous blank lines
There are 22 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
see webdriverio/webdriverio#1063 for some background. it appears this line:
runInFiberContext(
INTERFACES[this.config.mochaOpts.ui][2],
this.config.beforeHook,
this.config.afterHook,
fnName
)
is preventing tests promise chaining from working correctly
Branch | Build failing ๐จ |
---|---|
Dependency | eslint-plugin-import |
Current Version | 2.3.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As eslint-plugin-import is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
The new version differs by 10 commits.
44ca158
update utils changelog
a3728d7
bump eslint-module-utils to v2.1.0
3e29169
bump v2.4.0
ea9c92c
Merge pull request #737 from kevin940726/master
8f9b403
fix typos, enforce type of array of strings in allow option
95315e0
update CHANGELOG.md
28e1623
eslint-module-utils: filePath in parserOptions (#840)
2f690b4
update CI to build on Node 6+7 (#846)
7d41745
write doc, add two more tests
dedfb11
add allow glob for rule no-unassigned-import, fix #671
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
Looks like the greenkeeper bot has been updating dependencies (specifically fibers), but these changes have not been published. Could you publish this to make these package changes available?
https://github.com/webdriverio/wdio-sync/blob/master/index.js#L38
When running browser-automation tests with Chimp, which depends on wdio-sync, the above line is producing an exception:
Uncaught TypeError: Cannot read property 'trim' of undefined
at sanitizeErrorMessage (/usr/local/lib/node_modules/chimp/node_modules/wdio-sync/build/index.js:87:34)
at Object.<anonymous> (/usr/local/lib/node_modules/chimp/node_modules/wdio-sync/build/index.js:337:53)
at Context.<anonymous> (tests/e-suite.js:48:13)
at /usr/local/lib/node_modules/chimp/dist/lib/utils/fiberize.js:24:12
The wdio-sync code assumes that the call stack is an Array
with some element that can be shift
ed off. That condition is apparently not guaranteed.
Complains about node-gyp not being found.
As mentioned in #12:
browser.addCommand('mycustomfunc', function () {
console.log('mycustomfunc running now', Error().stack);
throw Error('mycustomfunc error');
});
prints:
mycustomfunc running now Error
at Error (native)
at Object.<anonymous> (/Users/george/Shell/sandboxes/ft-app-webdriverio/build/test/specs/startup.js:43:37)
at /Users/george/Sites/Git/wdio-sync/build/index.js:187:29
mycustomfunc running now Error
at Error (native)
at Object.<anonymous> (/Users/george/Shell/sandboxes/ft-app-webdriverio/build/test/specs/startup.js:43:37)
at /Users/george/Sites/Git/wdio-sync/build/index.js:187:29
(two calls here: https://github.com/webdriverio/wdio-sync/blob/master/index.js#L60). Also note the stack trace isn't very useful here, and should be improved if possible.
An async
custom function is similarly called twice:
mycustomfunc running now Error
at Error (native)
at Object.async (/Users/george/Shell/sandboxes/ft-app-webdriverio/build/test/specs/startup.js:43:37)
at Object.<anonymous> (/Users/george/Sites/Git/wdio-sync/build/index.js:348:30)
at /Users/george/Sites/Git/wdio-sync/build/index.js:250:23
at process._tickCallback (node.js:379:9)
mycustomfunc running now Error
at Error (native)
at Object.async (/Users/george/Shell/sandboxes/ft-app-webdriverio/build/test/specs/startup.js:43:37)
at Object.<anonymous> (/Users/george/Sites/Git/wdio-sync/build/index.js:348:30)
at Object.mycustomfunc (/Users/george/Sites/Git/wdio-sync/build/index.js:273:23)
at Context.<anonymous> (/Users/george/Shell/sandboxes/ft-app-webdriverio/build/test/specs/startup.js:78:11)
at /Users/george/Sites/Git/wdio-sync/build/index.js:401:24
(first call here: https://github.com/webdriverio/wdio-sync/blob/master/index.js#L115, second call here: https://github.com/webdriverio/wdio-sync/blob/master/index.js#L143).
Whichever way we handle failures when calling a future, I don't think the custom function should be called twice - I think that's unexpected from a user's point of view.
Happens when running a custom command that's returning a promise that resolves undefined.
Stacktrace:
TypeError: Cannot read property 'ELEMENT' of undefined
at is$$Result (/Users/jmnsf/Code/conversio-app/node_modules/wdio-sync/build/index.js:348:63)
at Promise.applyPrototype (/Users/jmnsf/Code/conversio-app/node_modules/wdio-sync/build/index.js:363:199)
at /Users/jmnsf/Code/conversio-app/node_modules/wdio-sync/build/index.js:322:63
at process._tickDomainCallback (internal/process/next_tick.js:129:7)
Array contents:
[ undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined ]
webdriverio: 4.6.2
wdio-sync: 0.6.3
wdio-mocha-framework: 0.5.9
The following test:
browser.addCommand('test', function () {
throw {
errorMessage: 'some error'
};
});
describe('test', () => {
it('It should work', () => {
browser.test();
});
});
Results in a Cannot read property 'split' of undefined
error:
[chrome 54.0 #0a] Running: chrome (v54.0)
[chrome 54.0 #0a]
[chrome 54.0 #0a] test
[chrome 54.0 #0a] 1) it should work
[chrome 54.0 #0a]
[chrome 54.0 #0a]
[chrome 54.0 #0a] 1 failing (5s)
[chrome 54.0 #0a]
[chrome 54.0 #0a] 1) test it should work:
[chrome 54.0 #0a] Cannot read property 'split' of undefined
[chrome 54.0 #0a] TypeError: Cannot read property 'split' of undefined
[chrome 54.0 #0a] at Context.<anonymous> (/some/path/to/test.spec.js:7:18)
From the stacktrace, it isn't apparent where the error actually occurs. It also swallows the actual error that was thrown. Instead of Cannot read property 'split' of undefined
, it would be helpful if the error message was the thrown { errorMessage: 'some error' }
object.
(Digging deeper, it looks like the error is thrown at this line. It is trying to parse a stacktrace that doesn't exist because an object was thrown instead of an Error
.)
<input type="checkbox">
<input type="checkbox">
$$('input[type=checkbox]').getAttribute('checked');
crashes with
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1):
TypeError: Cannot read property 'ELEMENT' of null
By catching unhandled rejections in my code with
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
I got a stack trace of
Unhandled Rejection at: Promise Promise {
<rejected> TypeError: Cannot read property 'ELEMENT' of null
at is$$Result (/usr/src/app/node_modules/wdio-sync/build/index.js:506:63)
at Object.applyPrototype (/usr/src/app/node_modules/wdio-sync/build/index.js:535:105)
at Object.<anonymous> (/usr/src/app/node_modules/wdio-sync/build/index.js:452:58)
at Object.exec (/usr/src/app/node_modules/webdriverio/build/lib/helpers/safeExecute.js:28:24)
at Object.resolve (/usr/src/app/node_modules/webdriverio/build/lib/webdriverio.js:193:29)
at /usr/src/app/node_modules/webdriverio/build/lib/webdriverio.js:503:32
at _fulfilled (/usr/src/app/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/usr/src/app/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/usr/src/app/node_modules/q/q.js:796:13)
at /usr/src/app/node_modules/q/q.js:604:44 }
That leads us to is$$Result
which checks if the result is an array of objects that have an .ELEMENT
property. The problem is that getAttribute
will return null
when the attribute is not set, hence the Cannot read property 'ELEMENT' of null
error.
browser.addCommand('george', function() {
browser.url('/');
})
browser.george();
console.log(browser.getCommandHistory())
// gives:
[ { name: 'init', args: [] },
{ name: 'windowHandleMaximize', args: [] },
{ name: 'timeoutsAsyncScript', args: [ 5000 ] },
{ name: 'url', args: [ '/' ] } ]
Custom commands in v4.0 are somehow not added to the commandList
, so obviously bypass https://github.com/webdriverio/webdriverio/blob/v4.0/lib/webdriverio.js#L169-L172 somehow.
Branch | Build failing ๐จ |
---|---|
Dependency | should |
Current Version | 13.1.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
should is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | sinon |
Current Version | 4.0.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 21 commits.
39e5737
Update docs/changelog.md and set new release id in docs/_config.yml
c2bd7b1
Add release documentation for v4.0.2
da24e94
4.0.2
cea60e8
Update History.md and AUTHORS for new release
d4dcfca
Document the stub.reset breaking change (#1590)
aab1917
Merge pull request #1596 from mroderick/fix-preversion-to-use-history.md
5dbe685
Update 'nise' to latest version (#1593)
578b9ea
Update History.md and AUTHORS for new release
499b698
Fix preversion.sh to stage History.md
1e5fd0f
Remove unneeded characters
2a69d51
fix typo in contributing
6cc71ec
Document how to trigger progress events (#1585)
e49fcf1
Fix broken test-coverage task
527086a
Use supports-color module to test if system supports colors
78782b4
Merge pull request #1580 from mroderick/dependency-hygeine
There are 21 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donโt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | sinon |
Current Version | 3.2.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As sinon is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
The new version differs by 24 commits.
e9f40a2
Rename Changelog.txt to History.md
40edb3e
Update docs/changelog.md and set new release id in docs/_config.yml
27986c8
Add release documentation for v3.3.0
85f30b5
3.3.0
7d45683
Update Changelog.txt and AUTHORS for new release
10906a7
Merge pull request #1560 from servel333/nested_property_matcher
a54b38c
Fixes docs for error.
04ba963
Adds sinon.match.hasNested
5fbd9ee
Merge pull request #1549 from killmenot/fix-1442
0a34cf5
Merge pull request #1550 from kuba-orlik/patch-1
a90f3ce
Merge pull request #1558 from fatso83/fix-eslint-error
32e4516
Update code to stricter linting
212e91d
Fix eslint peerDependencies error
5606815
Fix double backticks in inline code examples
af30213
fix #1442
There are 24 commits in total.
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | eslint |
Current Version | 4.7.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As eslint is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
The new version differs by 3 commits.
e164397
4.7.2
b7818ba
Build: changelog update for 4.7.2
4f87732
Fix: Revert setting node.parent early (fixes #9331) (#9336)
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | eslint |
Current Version | 4.7.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As eslint is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
The new version differs by 14 commits.
8ebb034
4.8.0
916a2d7
Build: changelog update for 4.8.0
3f2b908
New: add option to report unused eslint-disable directives (fixes #9249) (#9250)
ff2be59
Fix: dot notation rule failing to catch string template (fixes #9350) (#9357)
b1372da
Chore: remove sourceCode property from Linter (refs #9161) (#9363)
cef6f8c
Docs: remove line about removing rules from semver policy (#9367)
06efe87
Fix: Add meta element with charset attribute. (#9365)
458ca67
Docs: update architecture page (fixes #9337) (#9345)
1c6bc67
Fix: special EventEmitter keys leak information about other rules (#9328)
d593e61
Docs: update eslint.org links to use https (#9358)
38d0cb2
Fix: fix wrong code-path about try-for-in (fixes #8848) (#9348)
434d9e2
Fix: Invalid font-size property value issue. (#9341)
a7668c2
Chore: Remove unnecessary slice from logging utility (#9343)
2ff6fb6
Chore: remove unused arguments in codebase (#9340)
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
Branch | Build failing ๐จ |
---|---|
Dependency | should |
Current Version | 13.0.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As should is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
TypeError
in case any argument passed to them..fulfill
/.fulfilledWith
to .resolve
/.resolvedWith`import should from 'should';
The new version differs by 6 commits.
c807e9d
Release 13.1.0
8acfba1
Merge pull request #154 from citizensas/master
c12afd0
chore: should has no default export
4a846b1
Fill history
f5c9cc3
Added check for zero argument assertions.
fe6b136
Added .resolved, .resolvedWith as aliases to .fulfilled, .fulfilledWith
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
When this happens, commandPromise
does not get prototype applied to the result.
https://github.com/webdriverio/wdio-sync/blob/master/index.js#L197
Branch | Build failing ๐จ |
---|---|
Dependency | babel-eslint |
Current Version | 8.0.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As babel-eslint is โonlyโ a devDependency of this project it might not break production or downstream projects, but โonlyโ your build or test tools โ preventing new deploys or publishes.
I recommend you give this issue a high priority. Iโm sure you can resolve this ๐ช
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot ๐ด
The following test was working when I had wdio-sync 0.5.8. I think 0.5.10 broke it.
import {expect} from 'chai'
import Promise from 'bluebird'
import 'core-js'
import 'regenerator-runtime/runtime'
describe('integration test setup', () => {
it('page loads with correct title', function () {
browser.url(process.env.APP_URL)
const title = browser.getTitle()
expect(title).to.equal('jcore.io')
})
})
Now with wdio-sync 0.5.10 I get the following error:
1) integration test setup page loads with correct title:
executeHooksWithArgs(...).finally is not a function
running phantomjs
TypeError: executeHooksWithArgs(...).finally is not a function
at Context.<anonymous> (index.js:8:13)
at new Promise (/usr/src/app/node_modules/core-js/modules/es6.promise.js:191:7)
If someone proposed a PR we should ensure linting and unit tests as well as coverage is covered. This requires to write initial unit tests of course.
sync mode:
it('...', function () {
// ...
});
async mode:
it('...', function async () {
// ...
});
I noticed that wrapAsync
in https://github.com/webdriverio/webdriverio/blob/562db5d1b90b2f7d34d4c6b282f087c9eb07a79e/lib/helpers/wrapAsync.js#L22 moves a synchronous command into the main commandName
space, but copies the async equivalent to commandName + 'Async'
. This doesn't work where there's already an equivalent - the executeAsync
command thereafter uses the asynchronous version of execute
, which is not what's desired.
I think the exact problem is replicated in this repo, at https://github.com/webdriverio/wdio-sync/blob/master/index.js#L17.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.