webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

Clarify correct behavior for uploading a folder via "Element Send Keys"

Open whimboo opened this issue 2 years ago • 12 comments

Quite some time ago we get a report for geckodriver that uploading a folder doesn't work. Hereby the relevant code didn't specify a list of files as required by the WebDriver specification for Element Send Keys, but just the folder name.

As also mentioned chromedriver supports that method and as such adds extra behavior on top of the WebDriver specification which other drivers like at least geckodriver doesn't do.

For a consistent behavior across browsers we should most likely support a unique behavior.

CC @sadym-chromium, @foolip, @gsnedders, @jgraham

whimboo avatar May 31 '23 06:05 whimboo

Also note step 8.5:

Verify that each file given by the user exists. If any do not, return error with error code invalid argument.

Chromedriver will not raise such an exception because it auto-populates the list with files as found in this folder.

whimboo avatar May 31 '23 07:05 whimboo

@sadym-chromium or @nechaev-chromium could you please have a look at this issue? When we get started to implement the file upload for BiDi we should have it spec compliant. Thanks.

CC @orkon

whimboo avatar Sep 18 '23 10:09 whimboo

@sadym-chromium or @nechaev-chromium could you please have a look at this issue? When we get started to implement the file upload for BiDi we should have it spec compliant. Thanks.

CC @OrKoN

Ping @sadym-chromium or @nechaev-chromium

whimboo avatar Oct 10 '23 06:10 whimboo

The Browser Testing and Tools Working Group just discussed Clarify correct behavior for uploading a folder via "Element Send Keys", and agreed to the following:

  • ACTION: Chromedriver folks to see what happens on a web page when and possible move ChromeDriver to Firefox implementation
The full IRC log of that discussion <AutomatedTester> Topic: Clarify correct behavior for uploading a folder via "Element Send Keys"
<AutomatedTester> github: https://github.com/w3c/webdriver/issues/1742
<AutomatedTester> whimboo: I have noticed this for a issue against for Firefox recently. Firefox doesnt do anything but ChromeDriver uploads all the files in the directory
<AutomatedTester> ... so what should we be doing as we could break backwards compat here
<AutomatedTester> q?
<AutomatedTester> automatedtester: I kinda think that we should follow what chromedriver is doing here for everyone
<AutomatedTester> whimboo: This will potentially upload files that people are not expecting here... so we might want to clarify things for users
<AutomatedTester> q?
<jgraham_> q?
<MaksimSadym> q+
<sadym> q+
<shs96c> https://irc.w3.org
<Randolf__> q+
<sadym> q-
<AutomatedTester_> ack MaksimSadym
<Randolf__> q-
<MaksimSadym> q-
<orkon___> q+
<AutomatedTester_> ack next
<Randolf__> q+
<AutomatedTester_> orkon___: I think we should probably move chromedriver towards to firefox. We should raise a bug and see what happens on the file.
<AutomatedTester_> ... and with regard to bidi, the validation is left to the client
<AutomatedTester_> q?
<Randolf__> q-
<Randolf__> q+
<AutomatedTester_> ACTION: Chromedriver folks to see what happens on a web page when and possible move ChromeDriver to Firefox implementation
<AutomatedTester_> ack next
<Randolf__> q-
<AutomatedTester_> Randolf__: this feels like it is OS territory here. I think we should just do something simple and move CHromedriver to just do files and not folders

css-meeting-bot avatar Nov 08 '23 17:11 css-meeting-bot

@sadym-chromium or @nechaev-chromium I wanted to ask if you already had a chance to check the action item from the November W3C meeting? Thanks.

whimboo avatar Jan 04 '24 08:01 whimboo

ping @nechaev-chromium

whimboo avatar Mar 19 '24 11:03 whimboo

I'm on it

nechaev-chromium avatar Mar 27 '24 17:03 nechaev-chromium

ChromeDriver just allows setting the directory path to : source code

nechaev-chromium avatar Apr 04 '24 10:04 nechaev-chromium

ChromeDriver just allows setting the directory path to : source code

Thanks @nechaev-chromium. Would you also mind to give feedback to the 2nd part of the action item which was:

ACTION: Chromedriver folks to see what happens on a web page when and possible move ChromeDriver to Firefox implementation

As per current classic specification using a folder is not allowed. And I think that we also don't allow that in BiDi.

whimboo avatar Apr 05 '24 11:04 whimboo

Thanks @nechaev-chromium. Would you also mind to give feedback to the 2nd part of the action item which was:

ACTION: Chromedriver folks to see what happens on a web page when and possible move ChromeDriver to Firefox implementation

As per current classic specification using a folder is not allowed. And I think that we also don't allow that in BiDi.

Ping @nechaev-chromium, @sadym-chromium

whimboo avatar Jul 17 '24 08:07 whimboo