I am trying to launch browser with a url that could record audio and video. using test cafe. After launching, I see a an Application error, A client side exception has occurred. Below is my code.
My arguements to run the test -
yarn run testcafe --hostname chrome e2e\launchwebSDK.js --live --use-fake-ui-for-media-stream --use-fake-device-for-media-stream
CodePudding user response:
It's likely that this problem occurs because Chrome doesn't allow calling the getUserMedia API from insecure origins. I recommend you specify localhost
as a hostname or enable https mode to bypass this limitation:
testcafe --hostname localhost ...
or
testcafe --ssl pfx=/path/to/cert.pfx ...
CodePudding user response:
Thanks a lot. It worked. Additionally I have generated an SSL certificate as well.