Selenium: How can I get the link for downloads that started automatically? - selenium

I am using selenium to automate some downloading tasks, but some pages start the downloads automatically and I need to know the links of those downloads during or after the download and the link is not available in the page.
How can I get the URL of the files that started downloading automatically?

If you are using Chrome to run your selenium scripts you can just navigate to the chrome://downloads/ and get the latest download file's URL.
Or you can fire a Ctrl+J keyboard action to the browser using java robot classes and open the tab.
(Chrome downloads page is a html page and you can capture elements in it)

Related

testing using selenium: chrome screensharing auto select tab and share with audio

I am testing my website using Selenium and I am able to open chrome with --auto-select-desktop-capture-source="tab_name" and select the tab when screen share is enabled. Now I want the audio playing in the tab to be in my stream along with the video. While doing it manually there is a checkbox which enables audio sharing but is there something which can help enable it from Selenium?
Here is a fiddle: https://jsfiddle.net/john_vera/yr2k9xob/5/
Notice the Share Audio checkbox after selecting chrome tab in the dialog. I want to check that from Selenium.
You could create an custom chromium build and implement an bypass for this dialog. To build chromium you can use these instructions (for windows): Here
Here the bypass in file display_media_access_handler.cc:
Look for this line:
// Orignal code
pending_request.picker->Show(picker_params, std::move(source_lists), std::move(done_callback));
And replace it with this
// Bypass dialog
content::DesktopMediaID screenSource(content::DesktopMediaID::TYPE_SCREEN, content::DesktopMediaID::kNullId, web_contents);
screenSource.audio_share = true;
OnPickerDialogResults(web_contents, screenSource);
// End of bypass
I testet it with Chromium Version 84.

Appium Android Testing Using UIAutomator showing error while trying Image Upload Feature

I am facing some Issue during Appium Testing Using UIAutomator
I need to Automate payment page but After try to take screenshot during testing it show me error .
Help me please.
By Using UI Automator file upload feature you can upload screenshot manually .
Take screenshot of screen which you need to Automate.
Open command Prompt and Enter below Command :-
adb shell uiautomator dump && adb pull /sdcard/window_dump.xml && start window_dump.xml
UI hierchary dumped to: /sdcard/window_dump.xml
3.Its open xml in browser copy that path.
4.Open your UI Automator and click on file and upload button and add screenshot and xml file.
5.You can see you screen and Element in UI Automator Viewer Now.
for More details check below link also:-
https://medium.com/#sagartripathi/appium-android-using-uiautomator-using-image-upload-ae5943f747c6

How to assert that download popup is active? selenium webdriver

I need to verify that download link is correct and when you click it that document is created for downloading.
so how can I assert that when test clicks link, after some time there is a download popup (sometimes there is no popup and I need test to fail then)

Downloading the file from email is not happening directly in IE

I am doing automation in IE, when I found attachment in my mail, I click the download button to download files, In chrome it directly downloads into the download folder, but in IE, when I press the download button, it opens the yellow color bar in the bottom, it gives me the option 'save','open','cancel', My question here is, Is there anyway I could able to cancel out this bar so that download directly happens inside download folder like the way it happens in Chrome?
You didn't provide any specific information about your application, but this MSDN link Customizing the download experience explains several possible options.

Safari Extension And Download Links

I'm working on a safari extension. I've included a start script in it, but it is not working with download link. for instance if I navigate to www.example.com/example.zip script is not getting called. I was wondering if it is possible to get it to work with download links?