How can I open an app with arguments in ChromeOS? - google-chrome-os

I need to use this Chrome argument,
--autoplay-policy=no-user-gesture-required
on Windows you simply add that to the shortcut on your Desktop.
But I can't seem to find a way on ChromeOS, any idea?

Related

Selenium Automation + chromedriver

I am trying to automate a web application wherein clicking a link downloads a PDF file. The default behavior of chromedriver should open a pop-up window for confirmation. I am facing issue with the same, In my case the file is directly downloading without prompting.(I need to pop up to change the file name)
My understanding is that there is no easy way to make Selenium download files. Browsers use native dialogs which cannot be controlled by JavaScript.
Why are you downloading a file in the first place?
Check out this for more detail.
This can be set via settings option,
refer the below link https://support.google.com/chrome/answer/95574

LUA windows: How do I launch windows metro app with Unified Remote script

I'm trying to make a custom remote for unified remote server in windows 8.1
The sample scripts have os.start(command). It works for something like calc, but I'm trying to launch a metro app 'netflix://' and Lua doesn't seem to want to accept it - I think it's not taking the front slashes.
Is there a way to get Lua to launch a metro app in windows? Thanks
Assuming you mean os.execute() command, to run commands that open files and run based on protocol association, you need to use start command:
os.execute("start http://google.com")
If you need to put the parameter in quotes, then make sure to include a pair of empty quotes as the first parameter:
os.execute([[start "" "netflix://..."]])
For os.start(), it seems that you have to pass the whole path to a command. The Unified Remote API states that it should match installed applications, but I believe it might only be applicable to applications with binaries in the PATH, which is why their example of calc works.
With this in mind, and knowing that start works well directly from PoweShell, this command does what we need:
os.start("C:\\WINDOWS\\system32\\cmd.exe", "/c", "start", "netflix:");
Answering this old question since it's the top google hit when looking for launching windows10 apps with Lua for Unified Remote
As a side note, due to limitations on the Netflix Win10 app, I ended up simply opening Firefox and giving it the Netflix URL. Assuming default installation:
os.start("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "https://www.netflix.com");

Selecting a file in MacOS Finder when running Selenium / Capybara test script

I'm attempting to upload a file on a page that I'm testing. The attach_file method within Capybara will not work here. The reason being that the upload feature is using a JS library named file-uploader here.
I'm actually able to invoke a mouse click in order to open a Finder window (in Mac OS) to allow me to select a file to open, however I'm not sure of how to work within this window. Essentially I'd like to select a file from my desktop and just click 'Open'.
Is there a way for me to work within this window to simply choose a file by its name and then click 'Open'?
I'm working in Firefox.
Dragging the file from my desktop into a div would also work, but I can not find a way to do that in Capybara either.
Thank you.
Selenium is a browser automation tool & as such any interaction with other components of operating systems is not possible. Once a browser opens a file open/Finder window, it's no longer the browser that you're interacting with. There are tools out there which can handle them, but i am not familiar enough to give a detailed response. Google the Robot framework, or AutoIt for starters.
Alternatively, since it's a JS library you're dealing with which handles the upload, you MAY be able to use the JavascriptExecutor to call library functions directly, which doesn't simulate the user experience, but may be enough to get past your hurdle.

Android Studio (Intellij Idea) - run/debug configuration - remembering which device to run on

I guess this is a bit of a longshot, but with Eclipse, if you were using an Android emulator which was not the included one (for example, VirtualBox), you could select it the first time you ran your program, and tick a checkbox saying "Use this device for future launches". But the same option does not exist in Android Studio (Intellij Idea), meaning you have to choose the emulator every time you want to run the program.
I'm wondering if anyone knows of any way I can hack this so it will always run on a particular emulator which is not the built-in emulator. Can I put the emulator's ip address and port into a config file somewhere so the program will always launch on it without me having to click? I know it's a small thing but it's just convenience.
Sure it does, click the dropdown next to the run config, and press "Edit Configurations"
You can then select an Emulator, A Device, or to ask you when you run the app (like you have now).
The correct answer is to select USB device as the default. The program will then automatically run on the connected Virtualbox emulator. The answer was provided by sasha_trn in this comment

Selenium- Issue-Clicking on windows pop-ups

I am using selenium to record some tests. We have a save to pdf button on our application that generates the windows open/ save or in firefox the ok/cancel windows pop up,
The issue is that i can;t get selenium to record my ok or cancel action since i think it is not a javascript window?
Does anyone know the command to do that?
thanks
Sadly, it's not possible to interact with such windows at the moment.
A good workaround for saving files dialog is to save the various parameters (local directory, etc) and tell your browser to not prompt for them, so the window won't pop at all.
See http://wiki.openqa.org/display/SEL/Selenium+Core+FAQ#SeleniumCoreFAQ-Whatyoucan%27tdowithSelenium
Create a separate firefox profile(command to open profile manager:-firefox -P) with the settings you want(you can give settings like where to download and save a file of a particular type automatically without prompting) and instruct your server to use that profile using the command : java -jar 'your server ' -firefoxProfileTemplate 'path_for_firefox_profile'