- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.6k
 
Closed
Closed
Copy link
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!B-gridEverything grid and server relatedEverything grid and server relatedG-safaridriverRequires fixes in SafariDriverRequires fixes in SafariDriverI-defectSomething is not working as intendedSomething is not working as intendedI-questionApplied to questions. Issues should be closed and send the user to community resources.Applied to questions. Issues should be closed and send the user to community resources.J-issue-templateApplied to issues not following the template, or missing information.Applied to issues not following the template, or missing information.
Description
What happened?
Selenium version : 4.24.0
Java : 11
Platform : MAC Sonoma 14.0
Browser : Safari v 17
I have setup a Selenium Grid with a MAC hub and multiple mac nodes. When i am trying to perform a file upload operation through grid it's failing and throwing following exception.
org.openqa.selenium.InvalidArgumentException: An invalid command argument was specified: One or more files could not be selected.
Please note that on running the test without grid this seems to be working fine. I have tried changing the path with "/" and "\" but nothing seems to be working.
How can we reproduce the issue?
String hub = "http://*.*.*.*:4444/wd/hub";
            SafariOptions options = new SafariOptions();
            options.setCapability("browserName", "safari");
            options.setCapability("platformName", "mac");
            WebDriver driver = null;
            //driver = new RemoteWebDriver(new URL(hub), options);
            RemoteWebDriver driver = new RemoteWebDriver(new URL(hub), options);
            driver.setFileDetector(new LocalFileDetector());
        String filePath = "C:/sample.txt";
        driver.get("https://the-internet.herokuapp.com/upload");
        WebElement element = driver1.findElement(By.id("file-upload"));
        element.sendKeys(filePath);
### Relevant log output
```shell
org.openqa.selenium.InvalidArgumentException: An invalid command argument was specified: One or more files could not be selected.
Build info: version: '4.24.0', revision: '748ffc9bc3'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.23'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [BB0D158E-6371-4143-A373-9A3E5296337F, sendKeysToElement {value=[Ljava.lang.CharSequence;@2bd08376, id=node-D15E858C-69C7-4467-8D03-373A0981CD24}]
Capabilities {acceptInsecureCerts: false, browserName: Safari, browserVersion: 17.0, platformName: mac, safari:automaticInspection: false, safari:automaticProfiling: false, safari:diagnose: false, safari:platformBuildVersion: 23A344, safari:platformVersion: 14.0, safari:useSimulator: false, se:bidiEnabled: false, se:cdpEnabled: false, setWindowRect: true, strictFileInteractability: false, webkit:WebRTC: {DisableICECandidateFiltering: false, DisableInsecureMediaCapture: false}}
Element: [[RemoteWebDriver: Safari on mac (BB0D158E-6371-4143-A373-9A3E5296337F)] -> id: file-upload]
Session ID: BB0D158E-6371-4143-A373-9A3E5296337F
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.openqa.selenium.remote.ErrorCodec.decode(ErrorCodec.java:167)
	at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:138)
	at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:190)
	at org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:53)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
	at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:223)
	at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:110)
Operating System
macOS
Selenium version
4.24.0
What are the browser(s) and version(s) where you see this issue?
Safari
What are the browser driver(s) and version(s) where you see this issue?
Safari 17
Are you using Selenium Grid?
4.24.0
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!B-gridEverything grid and server relatedEverything grid and server relatedG-safaridriverRequires fixes in SafariDriverRequires fixes in SafariDriverI-defectSomething is not working as intendedSomething is not working as intendedI-questionApplied to questions. Issues should be closed and send the user to community resources.Applied to questions. Issues should be closed and send the user to community resources.J-issue-templateApplied to issues not following the template, or missing information.Applied to issues not following the template, or missing information.