w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
676 stars 190 forks source link

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

Open whimboo opened 1 year ago

whimboo commented 1 year ago

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 commented 1 year ago

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 commented 9 months ago

@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 commented 8 months ago

@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

css-meeting-bot commented 8 months ago

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:

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
whimboo commented 6 months ago

@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 commented 3 months ago

ping @nechaev-chromium

nechaev-chromium commented 3 months ago

I'm on it

nechaev-chromium commented 3 months ago

ChromeDriver just allows setting the directory path to : source code

whimboo commented 3 months ago

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.