Superb Naveen ... I become fan of you. For any selenium issue - I preferred your channel to troubleshoot. And never disappointed from you. BIG HATS OFF to you.
Kudos to your way of teaching... really helpful indeed!☺ Could you please make one more video on Capabilities please? And also for CSS selector. thanks in advance
Hi Naveen, Is there a way to make the same settings in IE browser.Since we have browser constraint so we need to execute only in IE.I have tried using keyboard events but when test is executing remotely,if it is minimized or locked test is getting failed.Could you please help here
Hi naveen your explanation is good, but i need to download the file in remote systems like mac or any other then how to download the file it is suitable for remote systems or not
Hi @Naveen Thanks for sharing this video... Actually if we push the code on Bitbucket and run the TC on Jenkins that time file is not getting download an TC is getting failed... Can u please help out...
Hello Naveen, could you please make a video on how to import file from run time created folder. Actually I have to perform operation -run time export file and after that same exported file I have to import. As per your video I have exported file but now question is how to import that same exported file. choose_file.sendKeys(System.getProperty("user.dir")+"\\Import_files\\Wordform template for pestname_abc.docx"); What path exactly I need to send in sendkeys.
Hi Naveen sir, as always your videos are awesome ! Can you pls guide me how to test upload and download functionality in headless chrome browser ? I am using chrome in headless mode.
Hey Naveen, While writing driver= new ChromeDriver(cap) , it is giving error that the constructor ChromeDriver(Capabilities) is deprecated. Could you please tell how to handle this?
for Chrome, you can try below code :- ChromeOptions options = new ChromeOptions(); Map pref= new HashMap(); pref.put("profile.default_content_settings.popups", 0); pref.put("download.default_directory", folder.getAbsolutePath()); options.setExperimentalOption("prefs", pref); driver= new ChromeDriver(options);
Hi Naveen, Appreciate your smarter approach on downloading instead of using third party. I have written a program to download the files in chrome. But the files with the extensions ".msg" is not getting download due to the chrome pop up" This type of file can harm your computer. Do you want to keep anyway? As my requirement is to download more no of files I have followed your smarter approach. But I am not able to download the files with type(.msg, .exe) I have googled lot and added chrome options and Preferences noting helped me. Please help me out to disable this pop up and files where save automatically as like other. here is my code public void browserSetup() { File folder= new File("F:\\HJUI78965"); folder.mkdir(); System.setProperty("webdriver.chrome.driver",".\\lib\\chromedriver_win32\\chromedriver.exe"); ChromeOptions options= new ChromeOptions(); Map prefs = new HashMap(); prefs.put("profile.default_content_settings.popups", 0); prefs.put("download.prompt_for_download", false); prefs.put("plugins.always_open_pdf_externally", true);
prefs.put("download.default_directory", folder.getAbsolutePath()); options.setExperimentalOption("prefs", prefs); driver= new ChromeDriver(options); } i have tried with below lines does not work prefs.put("safebrowsing.enabled", false);// tried with true also prefs.put("download.directory_upgrade",true); options.addArguments("--safebrowsing-manual-download-blacklist"); options.addArguments("--safebrowsing-disable-download-protection"); Looking forward for your response.
Superb Naveen ... I become fan of you. For any selenium issue - I preferred your channel to troubleshoot. And never disappointed from you. BIG HATS OFF to you.
Kudos to your way of teaching... really helpful indeed!☺
Could you please make one more video on Capabilities please? And also for CSS selector.
thanks in advance
Hey, Naveen after adding the driver =new ChromeDriver(cap); it shows this is deprecated, so do we have the alternate option, or will it work fine.
Same issue I'm also facing. Folder created but it is not downloading
Hi Naveen
Can you help me out with the following issue:
I want to compare the download file data with the data available on web page
Hey Naveen, can you please make a video on selenium to verify pdf files and videos open in another tab of browser.
Hi Naveen, Is there a way to make the same settings in IE browser.Since we have browser constraint so we need to execute only in IE.I have tried using keyboard events but when test is executing remotely,if it is minimized or locked test is getting failed.Could you please help here
Thank you so much.....😍😍.
Hi naveen your explanation is good, but i need to download the file in remote systems like mac or any other then how to download the file it is suitable for remote systems or not
Hello, I’m facing the same issue here. Did you found a solution for this?
Hello sir,
By using Robot class simply I download file.
But how to verify that download folder?
please reply.
Hi Naveen, I want to close my chrome browser once download of file is completed how I can handle this thing in Selenium (Java).
Hi @Naveen
Thanks for sharing this video... Actually if we push the code on Bitbucket and run the TC on Jenkins that time file is not getting download an TC is getting failed...
Can u please help out...
were you able to solve this issue?
Hello Naveen, could you please make a video on how to import file from run time created folder. Actually I have to perform operation -run time export file and after that same exported file I have to import. As per your video I have exported file but now question is how to import that same exported file.
choose_file.sendKeys(System.getProperty("user.dir")+"\\Import_files\\Wordform template for pestname_abc.docx");
What path exactly I need to send in sendkeys.
How do I automate downloading a pdf file using download image link?
Please make a video on How to download files and do excell verification in Selenium GRID
Can you please make videos on desirecapabilities for browser
Hey Naveen, Can you add a video on uploading a file in all the ways?
Also, can you please make sessions for Salesforce API automation as well?
I am getting "No such session exception", how can i handle it?
What are preferences for IE BROWSER
Hi Naveen sir, as always your videos are awesome !
Can you pls guide me how to test upload and download functionality in headless chrome browser ?
I am using chrome in headless mode.
Hi Naveen sir,
Can we use same code with some changes using headless chrome too?
hey ..can you please describe how to download and verify files in Grid Node machine.......
Hi Naveen, How to do DesireCapabilities for Internet explorer browser?
can we do this after launching the browser?
vangala anusha I do have same question.let me know if you get any solution @Naveen can you help on same
Hi Naveen, if possible please make one more video on CSS Selector.
Hi Naveen,
Thanks for uploading video on this topic.
Can you please suggest why my downloaded file is coming with an extension of '.crdownload'?
Hi Naveen,
How can I open same downloaded file without specifying name as name would be dynamic?
Also I want to validate file text?
Thanks
Hi Monica ,Can you help me how you verified downloaded file text
Please tell me how to rename the file while downloading
Hey Naveen,
While writing driver= new ChromeDriver(cap) , it is giving error that the constructor ChromeDriver(Capabilities) is deprecated. Could you please tell how to handle this?
Even im facing the similar error.
Use the below code.
package popups;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class FileDownloadPopup
{
WebDriver driver;
FirefoxProfile prof = new FirefoxProfile();
FirefoxOptions options = new FirefoxOptions();
@BeforeMethod
public void setEnvi()
{
System.setProperty("webdriver.gecko.driver", "E:\\Selenium Dependencies\\BrowserExecutables\\geckodriver_win64_v0.21.0.exe");
prof.setPreference("browser.download.dir","E:\\Downloads");
prof.setPreference("browser.download.folderList", 2);
prof.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
options.setProfile(prof);
driver = new FirefoxDriver(options);
driver.get("file-examples.com/index.php/sample-documents-download/sample-xls-download/");
driver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);
}
@Test
public void FDPP()
{
driver.findElement(By.xpath("(//a[text()='Download sample xlsx file'])[1]")).click();
}
@AfterMethod
public void closeEnvi()
{
driver.close();
}
}
for Chrome, you can try below code :-
ChromeOptions options = new ChromeOptions();
Map pref= new HashMap();
pref.put("profile.default_content_settings.popups", 0);
pref.put("download.default_directory", folder.getAbsolutePath());
options.setExperimentalOption("prefs", pref);
driver= new ChromeDriver(options);
Hi Naveen,
Could you please help me how to download file in IE and Edge driver and save in specific folder.
Thanks,
hamcrest lines showing red lines in code
Same showing for me also
keyboard sound is....................?
Hi Naveen,
Appreciate your smarter approach on downloading instead of using third party.
I have written a program to download the files in chrome.
But the files with the extensions ".msg" is not getting download due to the chrome pop up" This type of file can harm your computer. Do you want to keep anyway?
As my requirement is to download more no of files
I have followed your smarter approach. But I am not able to download the files with type(.msg, .exe)
I have googled lot and added chrome options and Preferences noting helped me.
Please help me out to disable this pop up and files where save automatically as like other.
here is my code
public void browserSetup()
{ File folder= new File("F:\\HJUI78965");
folder.mkdir();
System.setProperty("webdriver.chrome.driver",".\\lib\\chromedriver_win32\\chromedriver.exe");
ChromeOptions options= new ChromeOptions();
Map prefs = new HashMap();
prefs.put("profile.default_content_settings.popups", 0);
prefs.put("download.prompt_for_download", false);
prefs.put("plugins.always_open_pdf_externally", true);
prefs.put("download.default_directory", folder.getAbsolutePath());
options.setExperimentalOption("prefs", prefs);
driver= new ChromeDriver(options);
}
i have tried with below lines does not work
prefs.put("safebrowsing.enabled", false);// tried with true also
prefs.put("download.directory_upgrade",true);
options.addArguments("--safebrowsing-manual-download-blacklist");
options.addArguments("--safebrowsing-disable-download-protection");
Looking forward for your response.
Hi Naveen , I guess using wget is an easy way to download file ...