Execute Selenium Grid - The process of uploading multiple files simultaneously to a webpage by using sendkeys

We are currently utilizing Selenium BDD scenarios on a Selenium Grid with Chrome browsers and Windows operating systems for the node machines. One of our scenarios involves uploading multiple files to a webpage. Here is the code I am using for remote execution:

WebElement element = driver.findElement(By.id("'fileUploadField'"));
((RemoteWebElement) element).setFileDetector(new LocalFileDetector());
element.sendKeys("<absolute path of files separated by '\n'>");

When running this code locally and providing absolute file paths separated by '\n' to the 'sendKeys' method, it works perfectly fine and uploads all files to the webpage.

The issue arises during Selenium Grid execution where the same approach fails without any errors being shown by Selenium. It seems like the file paths are not recognized. How can I make this work for remote execution as well? Essentially, the goal is to send the files through the grid to the node machine and have them uploaded to the webpage. The above code works for remote execution if only one file path is provided.

Is there a known bug with Selenium related to this issue?

Answer №1

Regrettably, selenium does not currently support multi-file uploads. The fact that it is functioning for you on a local level is quite remarkable.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Selenium C# failing to identify newly opened browser window

I am currently experiencing some synchronization issues in my code. While executing a process, I click a button that opens a new window. To switch to the new window, I am using the following code snippet: _webdriver.SwitchTo().Window(_webdriver.WindowHand ...

Encountered an Xpath error while attempting to create a random email generator using Selenium IDE

While attempting to execute a script, I encountered an "element not found" error with Selenium failing to detect the xpath. My goal is to randomly generate email addresses. Every time there is an error message stating: [error] Element .//[@id='GmailA ...

Prevent all downloads using ChromeDriver and Selenium

When using Selenium with ChromeDriver to access static files like hudoig.gov/sites/default/files/documents/2016-FW-1007.pdf (just an example), the file automatically downloads to my default download folder. Is there a way to stop this default behavior and ...

Guidance on targeting specific coordinates on a webpage with a single click

While working with Selenium Webdriver, I encountered a situation where I needed to click on a link within a page. However, I was unable to access the element using the href value as shown below: var link = WebDriver.FindElements(By.XPath("//a[@href=' ...

What are the steps to perform integration and end-to-end testing for a Chrome extension in the year 2021?

Currently, I am in the process of developing a Chrome extension that eliminates certain content from a website. My goal is to establish integration and end-to-end tests to ensure... functions that manipulate data in the chrome.storage API the functionalit ...

How can I ensure that chromedriver in my Test Automation Suite directory is always kept up to date automatically?

Currently, my Automation framework utilizes Selenium and Python to operate. The Chrome browser is run using the chrome driver stored within a specific directory in the automation framework. However, the issue arises when the chrome driver undergoes updates ...

Is there a way to utilize Java and the Rest API to upload PDF documents in Egnyte?

In order to transfer the PDF files stored on the local drive (D:), I am looking to utilize Rest API in Java to upload them to Egnyte. ...

Discovering void or absence when extracting information from a website using Selenium in Python

I am trying to retrieve the website's activity and uptime data, but I'm only able to get the activity status and not the uptime information. I have targeted the exact class of the website, but it shows null. Can someone please assist me in modify ...

Using Capybara for testing integration with asynchronous JavaScript

I am currently facing an issue with a failing Rails integration test that has me stumped. The test utilizes Capybara with Selenium as the driver. The specific problem lies in verifying that certain page content is removed after an AJAX call is made. Essen ...

When executing in the local development environment, Selenium tests encounter errors and reach the error page with a connection issue (about:neterror?e=connection). However, the same tests fail

Encountering a perplexing issue with a Selenium test that fails in Travis CI but runs smoothly in the local development environment. The error message indicates that Firefox is unable to establish a connection to the server at localhost. To troubleshoot th ...

Ways to retrieve the data from the table on this webpage

I am attempting to extract data from a table displayed on the screen in order to select rows with a status other than accepted. The code I'm using is as follows: thead = driver.find_element_by_tag_name('thead') columns = [th.text for th in t ...

Successfully opened website using Selenium chromedriver, however unable to interact with its contents

My current challenge involves using Selenium and ChromeDriver to interact with the Lowes website (https://www.lowes.com/). I am able to load the home page successfully, but when I try to change the location by clicking on the specific button, the website g ...

The if condition in Kantu is throwing an error due to an invalid token being

Recently, I decided to give the Kantu web automation tool a try for the first time. While most of it seems straightforward, I've come across an issue when trying to loop through a CSV file. Here's the relevant section of my script: { "Comm ...

Error message: Trying to access a property of an empty object (variable 'element') is not possible

I've been attempting to execute the following code: WebElement body = driver.findElement(By.xpath("/html/body")); js.executeScript("var injector = window.angular.element(argument[0]).injector(); var $http = injector.get('$http&apos ...

What steps should be taken to set up a Python Selenium project for use on a client's machine?

As a new freelance python programmer, I recently took on a project to create a script that scrapes specific information online. Nothing sketchy, just counting how often certain keywords show up in search results. I used Selenium to write the script, but n ...

The commands sent to the Target Session after the initial one will have no impact. This applies to Chrome Selenium CDP Bidi API - Next Commands

Greetings everyone! I'm currently encountering a significant issue with hooking the TargetCreated Event and sending CDP commands to each new target discovered. I am utilizing the latest versions of Selenium and Chrome for this task. Upon initiating ...

Issue with Katalon Studio on Mac: It is unable to click a button and instead tries to click the HTML parent tag

In my Katalon Studio script, I have a button click command that uses scrollIntoView to bring the button into view before clicking it. ((JavascriptExecutor) functiondriver).executeScript("arguments[0].scrollIntoView({block: \"nearest\"});", butto ...

The objects fail to initialize when using PageFactory.initElements(driver,class);

I am facing an issue while trying to initialize objects of the Homepage class Everything was working fine until yesterday, but for some unknown reason today it's not functioning properly package StepDefnitions; import org.openqa.selenium.WebDri ...

What steps can be taken to proceed with test execution following a failed assertion?

Although I realize this question may be a duplicate, I have been searching for a solution since yesterday without any luck. I am currently using Selenium Webdriver 2.47.1 and TestNG for automation purposes. My automation script consists of 12 tests, wherei ...

Scrape the web using Python to automatically click the "load more" button until it no longer appears, collecting all tables and saving them in a CSV file

I am interested in downloading all tables from a specific website that lists all doctors in Paris. The website link is provided here: . To access all the names, it requires clicking on the "afficher plus de résultats" button multiple times until all resul ...