TestCafe on a Mac - no admin privileges - macos

I'm trying to set up testing with TestCafe on my work Mac. However, every time I try to run my tests, I get the message about TestCafe requiring Screen Recording privileges:
TestCafe requires permission to record the screen. Open 'System Preferences > Security & Privacy > Privacy > Screen Recording' and check 'TestCafe Browser Tools' in the application list.
I would normally enable this via System Preferences, but my machine is locked down, and I do not have admin privileges to do so. Is there any way to get TestCafe working on a Mac WITHOUT that privilege? I've found various posts saying it depends on which version you run (I've tried v1.18.0 and latest without luck. I also tried adding the --disable-screenshots flag, but that does nothing.
When typing npm run test, I expected my tests to run. Instead, I received this message:
TestCafe requires permission to record the screen. Open 'System Preferences > Security & Privacy > Privacy > Screen Recording' and check 'TestCafe Browser Tools' in the application list.
Press any key to retry.
ERROR UnableToAccessScreenRecordingAPIError: The find-window process cannot access the Screen Recording API.
at runFindWindowBinary (~/dev/e2e-testing/node_modules/testcafe-browser-tools/src/api/find-window.js:36:19)
at Object.default_1 (~/dev/e2e-testing/node_modules/testcafe-browser-tools/src/api/find-window.js:43:15)
at checkAuthentication (~/dev/e2e-testing/node_modules/testcafe/src/cli/authentication-helper.ts:28:26)
at Object.authenticationHelper [as default] (~/dev/e2e-testing/node_modules/testcafe/src/cli/authentication-helper.ts:54:30)
at Runner._checkRequiredPermissions (~/dev/e2e-testing/node_modules/testcafe/src/runner/index.js:551:27)
at Runner._validateBrowsers (~/dev/e2e-testing/node_modules/testcafe/src/runner/index.js:305:13)
at Runner._validateRunOptions (~/dev/e2e-testing/node_modules/testcafe/src/runner/index.js:462:9)

Related

MetaMask problem showing in developer option's console

whenever I click to inspect a site and open the console...
I see this message:-
MetaMask: MetaMask will soon stop reloading pages on network change.
For more information, see: https://docs.metamask.io/guide/ethereum-provider.html#ethereum-autorefreshonnetworkchange
Set 'ethereum.autoRefreshOnNetworkChange' to 'false' to silence this warning.
MetaMask is not installed in the browser. I am using the Brave browser.
How can I stop this?
Metamask comes included in Brave Browser. Go to main menu -> extensions and you will see "Crypto Wallets" which is the built-in version of Metamask that comes pre-installed in Brave. From that screen, you can disable it by using the switch near the name of the extension.
Edit: I just disabled mine and verified that the warning goes away once disabled.

Chrome starts automatically when restarting my mac

I've tried to prevent Chrome from starting up when I reboot my mac.
There is no setting in the chrome settings to prevent this, It feels like Chrome is a computer virus, infecting my computer and ignoring user preferences.
I tried this but it doesn't work:
1) Start Chrome
2) Right-click the Chrome icon in the dock
3) Uncheck "Options > Open at Login"
In System Preferences, go to Users and Groups
Make sure to unlock (if needed) by putting in your credentials
Click on Login Items
I unchecked it (then later just pressed the minus symbol and removed it entirely)
After doing the above steps when you restart your computer, make sure you unclick "reopen windows when logging back in" as shown below. When I didn't do this step Chrome opened right back up upon restart, even though I had completely closed out of it prior to restart. you only have to do this once not every time you restart your mac.

Unable to recognize any objects in Chrome browser

Unable to recognize objects on Chrome browser via UFT 14.02
I am using Chrome 56.0.2924.87 and UFT 14.02
I have installed HPE Functional Testing Agent along with agent crx file item.
The Chrome browser is zoomed to 100%.
Using Object Spy, I am unable to recognize any object in the entire page. Every time, I try to hover over or click, it shows me as:
WinObject: Chrome Legacy Window
Also, If I try to click on record by going to "Record & Run settings → Open the following when recording or running".
I am getting the following error, though:
Unable to Launch browser. The specified browser is not installed
I have followed the following steps to solve my problem:
Set the system display settings to "100%" and resolution "2560 X 1440". Once this done, log out and log in back for the changes to take effect
Zoom the Chrome browser to "100%".
Drag and drop Agent.crx from the Installation/Chrome folder to browser to install the Extension.
Launch UFT and then launch Chrome browser. Use Object Spy, you can now see that objects are being identified.
I had the same problem. UFT had already installed the Agent Extension, but it was disabled. Enabled it from Extensions page. Worked fine.
Check if your Chrome is having the HPE Functional testing Agent through Options → MoreTools → Extensions.
And Enable if it is already installed and in Disable Mode
Open chrome://flags.
Search for "Touch events API" and set it to "Enabled"
Search for "User Activation V2" and set it to "Enabled"
Click the restart chrome prompt.

Show Firefox OS devtools on Firefox Developer Edition 'desktop'

I've an iMac with OS X Yosemite v.10.10.3. I use Firefox Developer Edition 40.0a2. I've a ZTE Open C (FR version) with Firefox OS; Boot2Gecko 2.1.0.0-prerelease (B2G OS).
What I'd like to do is the following: I've a basic webpage (mostyl HTML, CSS and JS) opened in my browser on my Firefox OS phone. I'd like to get the devtools (Cmd+Shift+i) and be able to edit that webpage with my Firefox Developer Edition browser on my iMac.
I've already tried these things:
Use webIDE.
Follow this potential solution.
Connecting a Firefox OS device.
WebIDE Troubleshooting.
Comment déboguer facilement du web y compris sur tablettes et téléphones—french article.
With webIDE, I can build a new app for Firefox OS (with or without a base theme) and I can use the devtools to inspect the DOM and stuff like that. I just want to achieve the exact same thing but directly on my desktop computer.
Do you have any clue?
Feel free to ask me if you need more piece of informations. ;)
Current status
When I launch the Firefox OS browser app, I can inspect (via the devtools) the homepage (DOM stuff, etc.). But when I load another webpage (Google for example), I can't inspect the DOM. Any idea about that?
I often get this message: http://puu.sh/ir2Ju/32563e51bc.png when I switch to several apps I want to debug.
If I understand correctly, you're trying to connect the Firefox Developer Edition WebIDE on your desktop to a tab that is open on your Firefox OS phone. Something like this?
If that's right, once you connect to your phone in the WebIDE, you should see a list of open browser tabs at the bottom of the "Open App" menu, which is in the top left of the WebIDE panel.
When you connect your phone, you have to accept remote debugging.
Then on the left of the window, you should see a dropdown menu with the apps that you can debug. By default, you can only debug unprivileged applications.
Click on the app, the you want to debug and in the middle of the screen click on the "wrench". It is the button to activate debugging.
Now the complicated part. In order to debug privileged apps such as the web Browser. You have to root your phone and change some preferences. To check that you have a rooted phone. Click on the runtime menu and then runtime info.
If your adb is in root mode, then you can press the button to request higher privileges. You can also do that by hand.
There for more info:
https://developer.mozilla.org/fr/docs/Tools/WebIDE/Running_and_debugging_apps#Unrestricted_app_debugging_%28including_certified_apps.2C_main_process.2C_etc.%29
https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager#Using_the_B2G_desktop_client
Using a real device
On your computer, enter the following command in Terminal/console to enter your device's filesystem via the shell:
adb shell
Your prompt should change to root#android. Next, stop B2G running using the following command:
stop b2g
Navigate to the following directory:
cd /data/b2g/mozilla/*.default/
Here, update the prefs.js file with the following line:
echo 'user_pref("devtools.debugger.forbid-certified-apps", false);' >> prefs.js
After you've finished editing and saving the file, start B2G again using the following command:
start b2g
Exit the android filesystem using the exit command; this will return you to your normal terminal prompt.
Next, reconnect to the App Manager and you should see certified apps appear for debugging.
When this is done, you should see the application "Browser" in the list of available apps for debugging. At the same time, you should see all other application of your phone available as debugging.

Is it possible to run 2 firefox instances one in safe mode and one not

I love firebug for helping debug my web apps, as well as seeing how others have implemented there sites. However firebug hinders memory leak testing.
I've just found that FireFox can be launched in safemode which disables all addons, which is great for memory usage testing however once firefix is launched (either samemode or not) all subsequent firefox launches (they all appear in task manager as 1 firefox instance) will use the mode of the first one.
I'd like to leave one in same mode testing some apps for leaks and use another with firebug to develop.
I've tried making a copy of the FireFix.exe and even copying the whole firefox directory but it still launches as one application.
I could always use VirtualBox to create a full virtual PC for this testing but that seams like a large overhead.
Edit
I have just tried the -no-remote switch but it just comes up with "firefox is already running .... you must first close the existing Firefox process.... "
First close all your Firefox instances. With all instances closed, run firefox via the "Run..." dialog on windows, typing "firefox -p". It will open with the profile manager, where you can create multiple profiles with different configurations.
After creating your profiles, just run you "main" browser using "firefox -p" and select your "main" profile. To open another instance using a different profile, run Firefox using "firefox -no-remote -p" and it will prompt the profile manager again, so you can choose a different profile.

Resources