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

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.

Related

chromedp fails to start a new instance of chrome

Hey guys I have been trying to automate a task on my browser's machine using chromedp.
I tried examples on the repo however they always fail:
unexpected fault address 0x7f7a36461000 fatal error: fault [signal SIGBUS: bus error code=0x2 addr=0x7f7a36461000 pc=0x53a9d5]
Example's source code am running can be found here.
As I understand chromedp comes with headless pre-compiled version of chrome. I have browsed the API documentation to see if it possible to pass a port on which the dev tools is listening, no success.
However when I tried mafredri/cdp it worked. I came to understand that chromedp is failing to start its embedded chrome. Although, I am not really sure. Why is this happening?
My env:
Google Chrome 85.0.4183.102
Ubuntu 18.04.4 LTS
go version go1.13.5 linux/amd64
Any help would be truly appreciated.
So, long story short I went to run tests on the chromedp locally installed library through go test, it failed. I opened an issue on the Github repo. While it was not indicated that it requires Go 1.14+ but it does.
If you encountered this issue, please proceed to first run the tests on the master branch locally installed library. If it is fails with the following log:
github.com/chromedp/chromedp [github.com/chromedp/chromedp.test]
./chromedp_test.go:862:3: t.Cleanup undefined (type *testing.T has no
field or method Cleanup) ./chromedp_test.go:948:5: t.Cleanup undefined
(type *testing.T has no field or method Cleanup)
./chromedp_test.go:950:5: t.Cleanup undefined (type *testing.T has no
field or method Cleanup) FAIL github.com/chromedp/chromedp [build
failed]
You need to know that t.Cleanup was added on Go 1.14 (credits to Oiyoo).
I hope this helps you if you are having the same problem.

Cypress tests not running. Error - node-cachedir

I am trying to run cypress from my application (to be tested) code. I am getting below error:
Uncaught Error: Your OS "browser" is currently not supported by node-cachedir.
Any help will be appreciated.

debugging bundled aurelia errors?

I'm getting a blank page and this error when testing my aurelia app. It worked until I made a bunch of changes and I don't know which one broke it. vendor-bundle.js:13551 is inside core code. I've got debug messages showing as you can see.Is there a way to find what causes an error like this other than undoing each change one at a time?
... snipped ...
DEBUG [aurelia] Configured plugin aurelia-templating-router.
DEBUG [aurelia] Loading plugin resources/index.
Uncaught SyntaxError: Unexpected token export
vendor-bundle.js:13551 Uncaught TypeError: Cannot read property '__useDefault' of undefined
at ensureOriginOnExports (vendor-bundle.js:13551)
at vendor-bundle.js:13659
at Object.execCb (vendor-bundle.js:5432)
at Module.check (vendor-bundle.js:4620)
at Module.<anonymous> (vendor-bundle.js:4875)
at vendor-bundle.js:3873
at vendor-bundle.js:4925
at each (vendor-bundle.js:3798)
at Module.emit (vendor-bundle.js:4924)
at Module.check (vendor-bundle.js:4675)
at Module.enable (vendor-bundle.js:4912)
at Module.init (vendor-bundle.js:4525)
at callGetModule (vendor-bundle.js:4939)
at Object.completeLoad (vendor-bundle.js:5347)
at HTMLScriptElement.onScriptLoad (vendor-bundle.js:5453)

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

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..

TypeError: null is not an object (evaluating 'document.body.querySelector('.alert > .bar.passed').innerText')

For some reason I'm getting intermittent failure to run (or at least report the running of) my jasmine tests. the error lies in run-jasmine.js and the error manifests itself as
`TypeError: null is not an object (evaluating 'document.body.querySelector('.alert > .bar.passed').innerText')
phantomjs://webpage.evaluate():58
phantomjs://webpage.evaluate():61`
I am running TeamCity 8.1.3 (build 30101), Jasmine 2.2.0 and phantomjs 2.0.0.
Build step command parameters are
--web-security=no
--local-to-remote-url-access=yes
--ignore-ssl-errors=yes
jasmine/run-jasmine.js
specs/SpecsRunner.html
I've tried downgrading Jasmine and phantomjs but no change. I've also tried various run-jasmine.js scripts but to no avail. Is anyone else having a similar problem?
Everything was fine until a few days ago and now it happens 90% of the time.
Thanks in advance.
I've found a new run-jasmine.js script that does the job.
daniel-chambers / run-jasmine.js
I tried this script before but was getting a problem with timeouts so I moved on but now I've increased the 'Default Max Timeout' in the script to 60 seconds, it seems to do the trick just fine.

Resources