Sir, I am trying to run file using protractor cucumber framework by using
async and await concept it passes all my tests but it always gives error
regarding angular testability and I don't know why it gives such a type of
error, please read the code below once and help me to figure out where I am
wrong in this approach.
Please refer below my feature file :-
Please refer my pageobjects file as below :-
Please refer step-definition file as below:-
Please refer configuration file conf.ts as below :-
Please refer console logs as below:-
[12:31:48] I/launcher - Running 1 instances of WebDriver
[12:31:48] I/direct - Using ChromeDriver directly...
DevTools listening on ws://127.0.0.1:54978/devtools/browser/3cec07ae-0398-49b1-8fd9-36607b210799
...Menu 9 option reached
..
1 scenario (1 passed)
4 steps (4 passed)
0m00.034s
(node:2484) UnhandledPromiseRejectionWarning: Error: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined. This could be either because this is a
non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping. See http://git.io/v4gXM for details"
at runWaitForAngularScript.then (E:\Backup_work\Protractor projects\cucumber2_framework\node_modules\protractor\built\browser.js:463:23)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)Error
at ElementArrayFinder.applyAction_ (E:\Backup_work\Protractor projects\cucumber2_framework\node_modules\protractor\built\element.js:459:27)
at ElementArrayFinder.(anonymous function).args [as click] (E:\Backup_work\Protractor projects\cucumber2_framework\node_modules\protractor\built\element.js:91:29)
at ElementFinder.(anonymous function).args [as click] (E:\Backup_work\Protractor projects\cucumber2_framework\node_modules\protractor\built\element.js:831:22)
at homepageclass.clickEXWmenu (E:\Backup_work\Protractor projects\cucumber2_framework\pageobjects\menu9.PO.js:10:29)
at World.<anonymous> (E:\Backup_work\Protractor projects\cucumber2_framework\Stepdefinition\first.steps.js:22:20)
at Generator.next (<anonymous>)
at E:\Backup_work\Protractor projects\cucumber2_framework\Stepdefinition\first.steps.js:7:71
at new Promise (<anonymous>)
at __awaiter (E:\Backup_work\Protractor projects\cucumber2_framework\Stepdefinition\first.steps.js:3:12)
at World.<anonymous> (E:\Backup_work\Protractor projects\cucumber2_framework\Stepdefinition\first.steps.js:21:12)
(node:2484) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2484) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:2484) UnhandledPromiseRejectionWarning: Error: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined. This could be either because this is a
non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping. See https://github.com/angular/protractor/issues/2643 for details"
at runWaitForAngularScript.then (E:\Backup_work\Protractor projects\cucumber2_framework\node_modules\protractor\built\browser.js:463:23)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)Error
at ElementArrayFinder.applyAction_ (E:\Backup_work\Protractor projects\cucumber2_framework\node_modules\protractor\built\element.js:459:27)
at ElementArrayFinder.(anonymous function).args [as click] (E:\Backup_work\Protractor projects\cucumber2_framework\node_modules\protractor\built\element.js:91:29)
at ElementFinder.(anonymous function).args [as click] (E:\Backup_work\Protractor projects\cucumber2_framework\node_modules\protractor\built\element.js:831:22)
at homepageclass.clickmenu9 (E:\Backup_work\Protractor projects\cucumber2_framework\pageobjects\menu9.PO.js:13:26)
at World.<anonymous> (E:\Backup_work\Protractor projects\cucumber2_framework\Stepdefinition\first.steps.js:26:10)
(node:2484) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
[12:31:50] I/launcher - 0 instance(s) of WebDriver still running
[12:31:50] I/launcher - chrome #01 passed
Your first problem here is you are using await but the function you are using await on is not async.
public async clickEXWMenu(){
await this.EXWenquirymenu.click();
}
This is how it should be ^
Related
I want to do the below in my protractor-cucumber framework. I can not use public repo like googleapi.com as per org policy:
webdriver-manager update --standalone=0 --chrome --alternate_cdn https://www.artifactrepository.xyz.net/artifactory/api/npm-teamdev/
Also this:
webdriver-manager update --chrome=0 --standalone --alternate_cdn https://www.artifactrepository.xyz.net/artifactory/api/npm-teamdev/
But i always get this as response:
C:\Users\ABCD\Desktop\JSProjects\protractor-cucumber>webdriver-manager
update --standalone=0 --chrome --alternate_cdn
https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/
curl -o
C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\downloads\chromedriver.xml
https://chromedriver.storage.googleapis.com/ curl
https://api.github.com/rate_limit -H "User-Agent:
angular/webdriver-manager" [ERROR]: { Error: getaddrinfo ENOTFOUND
api.github.com api.github.com:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26) errno: 'ENOTFOUND', code: 'ENOTFOUND', syscall: 'getaddrinfo',
hostname: 'api.github.com', host: 'api.github.com', port: 443 }
(node:8016) UnhandledPromiseRejectionWarning: TypeError: Cannot
convert undefined or null to object
at Function.keys ()
at getVersionObjs (C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\dist\lib\provider\utils\version_list.js:28:41)
at Object.getVersion (C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\dist\lib\provider\utils\version_list.js:12:25)
at GeckoDriver.updateBinary (C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\dist\lib\provider\geckodriver.js:62:43)
at process._tickCallback (internal/process/next_tick.js:68:7) (node:8016) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was
not handled with .catch(). (rejection id: 1) (node:8016) [DEP0018]
DeprecationWarning: Unhandled promise rejections are deprecated. In
the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
I have also tried to modify the cdn url in ./node_modules/protractor/node_modules/webdriver-manager/config.json
{
"cdnUrls": {
"selenium": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/",
"chromedriver": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/",
"geckodriver": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/",
"iedriver": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/"
}
}
This one also did not work for me. I got the same error.
I want to know what's the issue here and how can how to resolve it?
Does webdriver-manager expect xml when the request hits custom CDN url?
If yes, is there a way to update if it returns html instead of xml. Because I can see all these drivers in the repo.
When I start running the appium flutter script, I get this error and wait for 5 minutes. After that it continues the execution.
[FlutterDriver] Attempt #1
[FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:39420/uVLSKORHloI=/ws
[FlutterDriver] Connected to ws://127.0.0.1:39420/uVLSKORHloI=/ws
[FlutterDriver] "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame"]
[FlutterDriver] Cannot get Dart Isolate
[FlutterDriver] Error: "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame"]
[FlutterDriver] at Object.wrappedLogger.errorAndThrow (/usr/local/lib/node_modules/appium-flutter-driver/node_modules/appium-support/lib/logging.js:74:35)
[FlutterDriver] at Client.onOpenListener (/usr/local/lib/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:91:17)
[FlutterDriver] at runMicrotasks (<anonymous>)
[FlutterDriver] at processTicksAndRejections (internal/process/task_queues.js:93:5)
[FlutterDriver] Waiting 300 seconds before trying...
(node:71547) UnhandledPromiseRejectionWarning: Error: "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame"]
at Object.wrappedLogger.errorAndThrow (/usr/local/lib/node_modules/appium-flutter-driver/node_modules/appium-support/lib/logging.js:74:35)
at Client.onOpenListener (/usr/local/lib/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:91:17)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:71547) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
Whaat would be the issue?
So basically flutter app needs to have instrumentation enabled for the test automation to take effect.
Hence you need to add enableFlutterDriverExtension(); in main.dart while creating the debug app.
Just add that before runApp()
Hello whenever I run the following command
ionic cordova platform add android
It results to following error:
(node:304) UnhandledPromiseRejectionWarning: CordovaError: No platforms added to this project. Please use `cordova platform add <platform>`.
at Object.preProcessOptions (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\util.js:312:15)
at C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\run.js:30:32
at _fulfilled (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:810:14
at flush (C:\Users\mjdem\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
(node:304) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting
a promise which was not handled with .catch(). (rejection id: 1)
(node:304) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a
non-zero exit code.
Try this command:
cordova platform add android
Having an issue installing Strapi on my Mac. Not sure what is going on really. Tried running npm install strapi-hook-strapi-mongoose and ran into 404 Not Found: strapi-hook-strapi-mongoose#latest.
USERs-MacBook-Pro:DIRECTORY USER$ strapi start
[2018-08-08T04:22:21.087Z] warn (hook:strapi-mongoose) `strapi-hook-strapi-mongoose` is missing in your dependencies. Please run `npm install strapi-hook-strapi-mongoose`
(node:42355) UnhandledPromiseRejectionWarning: TypeError: strapi.models.core_store.forge is not a function
at Object.get (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/core/store.js:55:47)
at module.exports (/Users/USER/Documents/GitHub/DIRECTORY/plugins/settings-manager/config/functions/bootstrap.js:17:26)
at Promise (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:285:13)
at new Promise (<anonymous>)
at execBootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:273:11)
at Promise.all.Object.values.map.x (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:44)
at Array.map (<anonymous>)
at Strapi.bootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:35)
at Strapi.start (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:107:18)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:42355) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:42355) UnhandledPromiseRejectionWarning: TypeError: strapi.models.core_store.forge is not a function
at Object.get (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/core/store.js:55:47)
at module.exports (/Users/USER/Documents/GitHub/DIRECTORY/plugins/users-permissions/config/functions/bootstrap.js:77:45)
at Promise (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:285:13)
at new Promise (<anonymous>)
at execBootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:273:11)
at Promise.all.Object.values.map.x (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:44)
at Array.map (<anonymous>)
at Strapi.bootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:35)
at Strapi.start (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:107:18)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:42355) UnhandledPromiseRejectionWarning: ReferenceError: config is not defined
at fs.readdir (/Users/USER/Documents/GitHub/DIRECTORY/plugins/email/config/functions/bootstrap.js:53:40)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
(node:42355) UnhandledPromiseRejectionWarning: ReferenceError: config is not defined
at fs.readdir (/Users/USER/Documents/GitHub/DIRECTORY/plugins/upload/config/functions/bootstrap.js:55:40)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
[2018-08-08T04:22:25.197Z] info File changed: /Users/USER/Documents/GitHub/DIRECTORY/plugins/graphql/config/generated/schema.graphql
[2018-08-08T04:22:25.364Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.364Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.364Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.364Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.366Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.366Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.366Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.366Z] warn Perhaps you forgot to call it?
Installation
npm install strapi#alpha -g
Installation Guide
For Strapi installation Guide, Click here
Turns out this is a common Mac bug, instead of using the 'strapi' command where I too got that error, I created my project using yarn and I was able to get past it.
yarn create strapi-app new-project-name
Got the following error while running the porject:
(node:5692) UnhandledPromiseRejectionWarning: Error: The platform "andorid" does not appear to have been added to this project.
at Object.getPlatformApi (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\platforms\platforms.js:46:15)
at C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:54:38
at Array.map (<anonymous>)
at C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:52:47
at _fulfilled (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
at flush (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
(node:5692) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5692) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?
It looks like you have a typo in the platform: "andorid" instead of "android"
Have you checked the command that you use to build?