Enable Multiple Downloads Chrome Headless Selenium Python without original File replacement - python-3.x

Is there a command or argument that downloads multiple files with same name without deleting the file(file with same name) using chrome headless in Selenium Python?
I want to download multiple files with same name without replacing any of them.How do i enable this in headless Chrome +Selenium+Python?

Related

How to Selenium Load Chrome Extensions in a Specific Location

I am having an issue with Selenium (chrome+python 3.9) when loading extensions. I have set the user-data-dir to a specific location, but additionally loaded extensions from CRX are still loaded into to the localappdata.
Is there a way to force the extensions to load into another directory that isn't the randomly generated name in the appdata folder?

During download of executable of chrome extension getting Failed-Network error

I am creating a chrome extension. And as soon as user adds extension to chrome, new html page is opened and executable file downloaded to user machine. All needed files including exe takes part during packing process. But when I try to add extension, there is a problem with downloading exe: "Failed-Network error". Chrome acts my exe as a malicious software. How can I make my exe trustful?
This is part of Google's security measures as I found a blog post with regard to Chrome blocking exe files.

Update some chrome extension files from own server

I am writing a chrome extension in which some script and an XML file in which I data is to be read by the script are changed almost twice per day. If I include a link to it on every page load, my hosting server load will probably suffer. Isn't it possible to get a copy of my script and XML Files each time that the browser is launched in order to update them in my extension ?
PS : I resorted to this solution since it is not possible to get the Update of the extension directly from my server since chrome's last upgrades.
- Any other way to update my extension is welcomed .

Run Chrome Extensions using command prompt

Is it possible to run a chrome extension from command line?
I need to automate the process for my software, and my software will need to run that extension with a particular parameter.
I am using a Chrome Extension 'APK Downloader' by Yogi. The Extension works like this:-
"If a page contains any .apk file link, then when I click on the extension's icon on the address bar, it starts direct download of that .apk file"
Now, I have my software that needs some .apk file to download [The software will have the package name of the .apk file to be downloaded, which is used by the extension to generate a download link]. It will be an automatic process. So, I need to know if it is possible to pass a parameter to the extension automatically, and make the extension to work without clicking on it.
Is it possible to do so??
Unpacked extension can be loaded using the --load-extension= flag.
What I usually do is chromium --user-data-dir=/tmp/someuniquedirname --load-extension=path/to/extension --no-first-run.
The --user-data-dir= flag is used to specify a non-default user data directory, to minimize conflicts between your existing browser profile and the test directory. You can omit this flag if you want to use your default user profile.
The --no-first-runflag prevents the first run UI from showing up (e.g. the bubble that explains how to use the omnibox, and a "Getting Started" page that opens in a new tab).
You can load multiple extensions by separating the paths by commas, e.g. chromium --load-extension=path/to/one/extension,path/to/another/extension.
I have published some shell scripts and a convenience extension to speed up (manual) testing of Chrome extensions. Take a look at https://github.com/Rob--W/extension-dev-tools/tree/master/chrome.
it helps to open extension normally and after that hit F12 (dev tools) to see actual url...
having that i can, for example load "Selenium IDE" chrome extension as
(run from command prompt)
"C:\Program Files (x86)\Google\Chrome\Application\new_chrome.exe" chrome-extension://mooikfkahbdckldjjndioackbalphokd/index.html
on a mac:
osascript <<EOD
set theURL to "chrome://extensions/"
tell application "Google Chrome"
if windows = {} then
make new window
set URL of (active tab of window 1) to theURL
else
make new tab at the end of window 1 with properties {URL:theURL}
end if
activate
end tell
EOD
Question answered here:
https://superuser.com/a/979678

Chrome external extension not shown in extension list

I'm trying to install a Chrome external extension using a visual studio setup project and following the instructions listed in http://code.google.com/chrome/extensions/external_extensions.html#registry, I did the following to add an external extension to Google chrome:
Packed the extension and moved the resulting .crx file to a folder C:\Hafez\Grid_Bootstrapper
I've added a registry sub key named fnfnbeppfinmnjnjhedifcfllpcfgeea under the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\Extensions\ with the next two values:
1.path with a value of "C:\Hafez\Grid_Bootstrapper\fnfnbeppfinmnjnjhedifcfllpcfgeea.crx" and
2.version with a value of "1.0.0.1"
which are, by the way, the exact values but unfortunately when I start Chrome the extension is not listed.
BTW, I'm doing this in a installer custom action and it writes the values exactly the way I want them.
I can't find what is wrong because I do the exact steps listed in the link.
May you discover what have I done wrong?

Resources