'protractor exited with code: 3 Use --force to continue' in protractor - jasmine

I'm using protractor with jasmine framework to run my automation scripts. The test is failing with the following error:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Warning: Tests failed, protractor exited with code: 3 Use --force to continue.
while trying to get attribute value of an element.
But, I'm able to perform clicks and verifyElementPresent kind of actions for the same web element..
Could any one please help me out of this how to overcome this error.
Thanks in advance..

Related

An uncaught error was detected outside of a test

When I run all my component cypress tests locally on a Macbook pro on a react-vite project with around ~10 tests, I get the following error:
An uncaught error was detected outside of a test:
TypeError: The following error originated from your test code, not from Cypress.
> Failed to fetch dynamically imported module: http://localhost:5173/__cypress/src/cypress/support/component.ts
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
Cypress could not associate this error to any specific test.
We dynamically generated a new test to display this failure.
the error is not Consistant and doesn't show up on every run. It also throws on a random test every run. How can I solve this?
update: I think a possible lead could be that I import files on my project with the absolute paths pattern.
For example:
import {comp1, comp2} from 'components'
where as components is configured in my tsconfig.ts file
ok so after countless attempts to fix this and also encountering terminal freezes when I execute
cypress run.
I've gave up and created a bash script to run each of the tests in the code base separately:
set -x
#!/bin/bash
for file in $( find . -type f -name '*.spec.cy.tsx' );
do yarn cypress run --component --browser chrome --spec $file || exit 1
done
for now it seems to get the job done. Hope this helps anyone else that encounters this

'expect(...).withContext is not a function' error using Protractor

I use Protractor 7.0 and Jasemine 3.6.1, but when i use .withContext(), I get Failed: expect(...).toEqual(...).withContext is not a function error message.
I have searched the issue and the people suggest to update the Jasmine and Protractor, but it doesn't help.

Test run in cypress headless gives error cy.click()

I've a test cases written in cucumber and cypress. The test case run successfully through cypress Test runner, but fails while running through headless mode using the command.
node_modules\.bin\cypress run --spec **/*.features
CypressError: Timed out retrying: `cy.click()` failed because this element is not visible:
Questions:
what is the possible reason to have this element not visible error?
How can i handle the wait in headless mode?
The fix is :
Fix all your issues displayed on the console w.r.t xpaths, sync or
any such.

Uncaught AssertionError: Env not set, aborting run cypress issue

Everytime i try to run my cypress test i am getting this error:
Uncaught AssertionError: Env not set, aborting run
This error originated from your test code, not from Cypress.
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
Cypress could not associate this error to any specific test.
We dynamically generated a new test to display this failure.
Check your console for the stack trace or click this message to see where it originated from.
Maybe it is happening because when i run cypress open or run inside the folder, it opens like this and i have to manually select the test folder?
And when i do npm install, i get this error:
Required: {"node":">=8.9.4","npm":"~5.6.0"}
Actual: {"npm":"6.4.1","node":"11.11.0"}

Internal error: org.jetbrains.concurrency.MessageError: Helper script failed on remote: _jb_debug_helper is not defined

WebStorm 2017.2.1
Internal error: org.jetbrains.concurrency.MessageError: Helper script failed on remote: _jb_debug_helper is not defined
I am getting above error when tries to run debugger and look for certain properties in 'local' section. Even a single watch expression added to it does not return the result.
the issue is tracked as WEB-27884, please follow it for updates

Resources