bsmithb2 / testcafe-browser-provider-android Goto Github PK
View Code? Open in Web Editor NEWA testcafe browser provider for controlling Android devices locally
License: MIT License
A testcafe browser provider for controlling Android devices locally
License: MIT License
Inform users that the android debug bridge is required.
There should also be a link with information on how to obtain them on different OSes.
Screenshots can not be taken if the target directory is in another filesystem than the cwd.
Was unable to take a screenshot due to an error.
Error: EXDEV: cross-device link not permitted, rename 'screen.png' -> '/home/testsystem/network/share/test/android_chrome/master/0_Start.png'
at renameSync (fs.js:598:3)
at BrowserProviderPluginHost._callee6$ (/home/testsystem/TestSuite/node_modules/testcafe-browser-provider-android/lib/index.js:581:48)
at tryCatch (/home/testsystem/TestSuite/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/home/testsystem/TestSuite/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/home/testsystem/TestSuite/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/home/testsystem/TestSuite/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /home/testsystem/TestSuite/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
This can be resolved by switching from rename to copy&unlink
https://stackoverflow.com/questions/37153666/error-exdev-cross-device-link-not-permitted-rename-tmp-on-ubuntu-16-04-lts#44146825
It seems that publishing the package is part of the check pipeline. Is this desired?
If so: It does fail on any pull request because the build server is not authorized at npm.
These are the according lines in the build report for my latest PR #5:
npm ERR! need auth auth required for publishing
npm ERR! need auth You need to authorize this machine using `npm adduser`
There should be better error messages.
adb devices
(exception)This would also help debug #11
When connected via tcpip (https://developer.android.com/studio/command-line/adb#wireless) testcafe-browser-provider throws an exception:
[android] init()
[android] ---- Device/Browser List ----
[android] SM-T580:tablet:5555:chrome
[android] SM-T580:tablet:5555:firefox
[android] isValidBrowserName(browserName='SM-T580:tablet:5555:chrome')
[android] openBrowser(id='D78uKdY', url='http://172.16.120.9:34415/browser/connect/D78uKdY', browserName='SM-T580:tablet:5555:chrome')
[android] closeBrowser(id='D78uKdY(SM-T580:tablet:5555:chrome)')
Error: Was unable to open the browser "android:SM-T580:tablet:5555:chrome" due to error.
TypeError: Cannot read property 'packageName' of undefined
at BrowserProviderPluginHost._callee10$ (/home/testsystem/test/node_modules/testcafe-browser-provider-android/lib/index.js:711:102)
at tryCatch (/home/testsystem/test/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/home/testsystem/test/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/home/testsystem/test/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/home/testsystem/test/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /home/testsystem/test/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
at new Promise (<anonymous>)
at new F (/home/testsystem/test/node_modules/core-js/library/modules/_export.js:36:28)
at /home/testsystem/test/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12
at BrowserProviderPluginHost._kill (/home/testsystem/test/node_modules/testcafe-browser-provider-android/lib/index.js:719:12)
at /home/testsystem/test/node_modules/testcafe/src/browser/connection/index.js:87:32
at Generator.throw (<anonymous>)
at step (/home/testsystem/test/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /home/testsystem/test/node_modules/babel-runtime/helpers/asyncToGenerator.js:30:13
at process._tickCallback (internal/process/next_tick.js:68:7)
This is because of the naiive assumption that the browserName
always has exactly two colons (:
) ${model}:${deviceId}:${browser.name}
. But this is not true for devices that are connected via tcpip. They have four colons: ${model}:${deviceHostname}:${port}:${browser.name}
Although the current solution makes sure that each run starts with a clean browser, it is still undesireble to reset the complete browser. Some users might test on devices that are not exclusively used for testing. The current approach deletes all user data.
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.