How to set --no-sandbox for headless portable chrome - automated-tests

I want to run TestCafe on headless portable chrome with --no-sandbox flag
How can I do this?
I can run it without a flag
testcafe chrome:path/to/portable/chrome:headless test.js
But when I try set flag it doesn't work
testcafe chrome:path/to/portable/chrome:headless --no-sandbox test.js

Running with quotes '' helps
testcafe 'chrome:path/to/portable/chrome:headless --no-sandbox' test.js
I've closed my question

Related

Automation in Robot framework

I have written a simple test case to open Firefox browser and go to "https://www.google.co.in". I am getting this error.
Test script
*** Settings ***
Library Selenium2Library
*** Test Cases ***
case1
Open Browser https://www.google.co.in/ ff
To Run in Firefox we need geckodriver. Place geckodriver in C:/python/scripts and then try to run the scripts.
To Run in Chrome, place chrome driver X32 in C:/python/scripts and then run your scrpts
you need download driver firefox first
Download Here
Searching for the error: "Selenium OSerror [Errno 8] firefox" in Google the first few results were quite informative and it seems to me that this was not done.
The first few options highlight that not the correct webdriver is installed. Example here. (A different error is presented when the Gecko driver is not installed).
In a follow-up result item an explanation was given that the script is missing a shebang: #!/usr/bin/env bash when a script is fired.
Check the browser version and browser operation system(32 bit or 64 bit) then install the driver put inside python installation directory.
For Example :
C:\Python27/yourinstalleddriver.exe
either
C:\Python27\Scripts/yourinstalleddriver.exe
Most of the links relate to chrome driver not firefox. Well I degrade my firefox version and selenium version and this was solved.

How can I use grunt to open Google Chrome and pass flags like --incognito?

I am using grunt-contrib-connect for a local dev server and want to write a task to launch google chrome after server starts. But want to pass following arguments to open it in insecure mode.
--args --disable-web-security --user-data-dir
I tried grunt-open to do that but didn't find any options to pass flags.
Any help is appreciated.
You should be able to use grunt-exec to do what you need. A configuration like this works for me:
grunt.config.init({
...
exec: {
chrome: {
cmd: '"C:/Program Files (x86)/Google/Chrome/Application/chrome" --incognito http://washingtonpost.com'
}
}
...
});
Note that, on Windows, quotes are required around the path to the executable. If you're fortunate enough to be using less annoying OS, you won't need them.

Set Chrome as default browser using Grunt Connect and Grunt Open

I use Safari as default browser on my OS X but I want use Chrome as default for Grunt connect and watch so i follow the steps i found on this blog. Everything ok if i set 'Google Chrome Canary' or 'Firefox' as 'app' parameter in grunt open options but if i try to use 'Google Chrome' a virtualized app on Chrome starting on Parallel's Windows version! How can I say to grunt to use not Google Chrome on Parallels but on my Mac OS X?
Looking at open's source on line 31 it opens using this code:
opener = 'open -a "' + escape(appName) + '"';
Try using the full path to the chrome you want to use as the app parameter for the grunt task. You can play around with it from the terminal by entering in open -a /some/path/to/chrome so you do not have to run the whole grunt task.

Codelite terminal and debugger quit unexpectedly

I'm taking a CSCI class and it was recommended to use Codelite for Mac. I tested out the "Hello World" program and when I debug it i get "Codelite Could not launch terminal for debugger" and when I try to run it i get "Codelite-terminal quit unexpectedly."
This should be fixed with the latest weekly build:
http://downloads.codelite.org/ (8.2.2)
Also, I answered this on this post: cannot launch debugger on macos using codelite

How to debug a Meteor plugin file?

I've followed Meteor Doc to register a plug-in package.
Created a plug-in file in the package/plugin/ folder
Added a debugger; in that file.
ran $ meteor debug;
Problem: debugger; directive is ignored. How to debug the plug-in file?
Thx!
plugin/compile-atscript.js:
Plugin.registerSourceHandler(
'ats'
, function (compileStep) {
var source = compileStep.read().toString('utf8');
console.log('source: ' + source);
debugger;
console.log('compiled source: ' + source);
});
The Meteor tool runs build plugins in-process, so you just need to run it under the debugger. On Linux and Mac OS X, the launcher script supports a TOOL_NODE_FLAGS variable that can be used to pass arguments to the Node.js runtime to enable debugging. See the instructions for debugging the Meteor tool, although these are geared toward use with a git checkout of Meteor. A hacky shortcut:
METEOR_INSTALLATION=~/.meteor/packages/meteor-tool/$(meteor --long-version | sed -ne 's/^meteor-tool#//p')/mt-$(meteor --arch)
TOOL_NODE_FLAGS=$METEOR_INSTALLATION/dev_bundle/lib/node_modules/node-inspector/bin/node-debug.js $METEOR_INSTALLATION/meteor
(Note, using just meteor on the last line may not work because when the default version of the Meteor tool executes the proper version for the app, the debugger would be started a second time.)
On Windows, support for TOOL_NODE_FLAGS was added to the launcher script in Meteor 1.4.4. If the app is using an older version of Meteor, one could manually edit the launcher script. The commands to start debugging would look like:
set METEOR_INSTALLATION=%LOCALAPPDATA%\.meteor\packages\meteor-tool\TOOL_VERSION\mt-os.windows.x86_32
set TOOL_NODE_FLAGS=%METEOR_INSTALLATION%\dev_bundle\lib\node_modules\node-inspector\bin\node-debug.js
%METEOR_INSTALLATION%\meteor.bat
(Someone else is welcome to add copy-and-pasteable code to figure out the correct TOOL_VERSION!)
On macOS
Set Environment variable
export TOOL_NODE_FLAGS="--inspect-brk"
List env vars
printenv
Run meteor
meteor
Debugger will be listening and will get attached to Chrome dev tools on opening the Chrome Browser.

Resources