Is there an alternative to firefox profile to download files, i.e. through desiredcapability on selenium webdriver?
I want to download files from a website but through desiredcapabilities.
So one piece of code is applicable accross all the browsers.
In theory, you could create a AugmenterProvider and pass it to the Augmenter class but I have not done so and its beyond my skill.
Related
We are looking for a way to upload images/files in webpage where our automation framework is Selenium Web driver [Robot framework] and we are using AutoIt to do the same.
When we are using auto-it we are kept on observing corrupted issues. Looking for some one's support to overcome this,
You can use the keyword Choose File for File uploading in Robot Framework.
Syntax:
Choose File locator file_path
Example:
Choose File my_upload_field ${CURDIR}/trades.csv
For more details you can use this link
I have a requirement to verify the image dimension of a PDF, which is getting downloaded and saved to a particular location. I am curious to know that, is there any way we can check the image dimension of a PDF using Selenium WebDriver? Please help.
Selenium WebDriver is for browser automation. If your requirement is to validate pdf files, contents, images in the pdfs etc, I would suggest you to use the below pdf library.
http://www.testautomationguru.com/introducing-pdfutil-to-compare-pdf-files-extract-resources/
I am trying to upload a file using Selenium Webdriver on the Edge browser, and yes I have downloaded EdgeDriver and installed the MSI for testing Edge. Clicking on elements on the screen from within the Edge browser works fine. The problem is the upload file control. My code is as follows:
IWebElement fileUploader2 = Browser.Driver.FindElements(By.CssSelector("input[type='file']"))[0];
fileUploader2.SendKeys(FileUtility.FileUploadsDirectory + "\\sample-account_balances.xlsx");
The code above works for Chrome and Firefox, but does not work for Edge. This is a ReactJS web app. I have tried the suggestions below that are similar to my code above and I cannot seem to upload a file using the control programmatically from Selenium Webdriver. There is no error given it just does not click on send text to the file upload control. Nothing is executed:
How to upload file using Selenium Webdriver?
File Control on Edge
DOM Upload Control Edge
Unfortunately this feature has not been added to the edge webdriver yet. I've run into the same problem and have not been able to find a suitable solution yet. One (admitedly not ideal) solution is to use AutoIt to automate the file upload for edge. There are multiple reports of this issue, but here's one of the latest reports showing that its an issue with the edge driver.
If you are using Selenium in Java and have a string of HTML and JavaScript Source are you able to have a real browser render the source with the webdriver?
Yes you can open the HTML file in a browser. You have to specify the "file:///" protocol in get() method to open the file in browser. You can refer below code.
webdriver.get("file:///<filePath>/fileName.html");
Do let us know if that helps you out.
Firefox recently blacklisted the plugin that allows xbaps to work in firefox
This is a huge problem for me as one of my companies enterprise products is a web application that makes use of an xbap and must work in firefox.
Does anyone know if there is an update to the blacklisted plugin or if it is possible to overwrite the blacklist and use the plugin anyway?
The Windows Presentation Foundation plugin is no longer blocklisted. Are you sure it's still blocked?
What you need is to place the NPWPF.dll in the Firefox Plugin folder.
That works perfectly.
You can find the NPWPF.dll file in :
[WINDIR]\Microsoft.NET\Framework\v3.5\Windows Presentation Foundation