Selenium ChromeDriver SendKeys breaks jQuery File Upload Plugin - selenium

I'm creating a UI test for a page with async file upload experience using Selenium ChromeDriver. File upload is implemented using jQuery File Upload Plugin (https://github.com/blueimp/jQuery-File-Upload) which enhances an input type="file" with additional functionality like async upload, multiple files upload, drag-n-drop support etc.
As you know, the recommended way to deal with standard input type="file" in Selenium tests is something like
driver.FindElement(By.Id("fileinput")).SendKeys(#"c:\test.txt");
However, it does not work with this plugin. The server-side (in my case it is an MVC controller's POST action) does not get any calls from the client and when I open Chrome DevTools Console I can see the actual error Failed to load resource: net::ERR_FILE_NOT_FOUND (basically it complains about the unreachable server URI).
At the same time manually it works perfectly fine (when I navigate to the page, click Upload, choose file in Open file dialog and press Open). So it seems the problem can be in between Selenium and the upload plugin itself.
Has anyone else faced with the similar issues using jQuery File Upload Plugin + Selenium ChromeDriver? I'm running ChromeDriver version 2.9 and jQuery File Upload version 5.40.0.

Related

Unpacked Chrome extension not showing up in Extensions folder in Chrome Profile

I unpacked and loaded an extension for Chrome, https://github.com/iamadamdev/bypass-paywalls-chrome, but I need to find its corresponding folder in the Extensions folder in the Chrome profile path /Users//Library/Application Support/Google/Chrome/Default/Extensions/ and I can't find it there.
The rest of my Chrome extensions are there though, but those were installed directly from the Chrome Web Store whereas this one was unpacked with developer mode, so I'm wondering if that's the issue? If it is, or if it's due to something else, is there a way to fix this? I need to find it for my Selenium-based project, where the WebDriver opens up the Chrome browser with an extension preloaded, following https://seleniumjava.com/2016/05/22/start-the-chrome-browser-with-extensions/

PDF url is behaving differently in Selenium and normal application

i am facing a weird issue in Selenium. i have a option in my application, and when i click on that option it will open a pdf file in new window. but when i am running the same in Selenium Java Automation it is downloading the file from that option. (it is opening new tab quickly and file started downloading and new tab also closed once file started downloading)
does any body have a solution for this.

Selenium IDE Load Text From File

I have installed Selenium IDE for Chrome as well as Selenium Side Runner, NodeJS, and ChromeDriver. I am able to successfully create a .side project and run it against a website. However, I have not been able to figure out how to read text from a txt file (just a single numeral in this case) and insert it into a form field on a site. I have previous experience with iMacros, so I attempted to use some of that knowledge to get Selenium to read the file but with no luck. If I edit the .side file in Notepad++, it is mostly just css with embedded commands, so I am really not sure of next steps. Any assistance would be appreciated.

How to control file chooser with Selenium 2?

The selenium website claims:
It drives the browser much more effectively and over comes the
limitations of Selenium 1.x which affected our functional test
coverage, like the file upload or download, pop-ups and dialogs
barrier
But I know only of more or less strange hacks using AutoIt or AWT KeyEvents.
So, how can I tell Selenium to put a certain path into the file dialog (not the form element that opened the file dialog!) and click on 'OK'?

Selenium with SWFUpload

I tried to use Selenium for the automation testing script. The testing web page used SWFUpload for uploading. I don't see any api in Selenium to resolve the upload.
Here is the page: http://demo.swfupload.org/v220/multiinstancedemo/index.php
I found flash-selenium but it is not useful.
http://code.google.com/p/flash-selenium/
Thanks,
Jame
One way of uploading documents is by using autoscripts.
However, autoit scripts are only supported on a windows machine.
You need to do following:
Click on browse button.
Run the .exe autoit file.(exe file can be converted from autoit scripts).