From 41b2a5962f91986a0ea357ee7aa9d8c1217d5b2c Mon Sep 17 00:00:00 2001 From: Tatu Aalto <2665023+aaltat@users.noreply.github.com> Date: Tue, 5 Mar 2019 22:03:51 +0200 Subject: [PATCH 1/2] Update Choose File doc to mention support for grid The Selenium will, magically, transfer the file from the file system where Robot Framework is running to the Selenium Grid node file system. Selenium will ensure that file is transferred to know location, like %TMP% or $TMP and file system does not have to same (Example transfer from Windows to Linux works fine.) Fixes #449 --- src/SeleniumLibrary/keywords/formelement.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SeleniumLibrary/keywords/formelement.py b/src/SeleniumLibrary/keywords/formelement.py index 4ecf2638a..6077eb043 100644 --- a/src/SeleniumLibrary/keywords/formelement.py +++ b/src/SeleniumLibrary/keywords/formelement.py @@ -197,7 +197,10 @@ def choose_file(self, locator, file_path): This keyword is most often used to input files into upload forms. The file specified with ``file_path`` must be available on machine - where tests are executed. + where tests are executed. When using Selenium Grid, Selenium + will, magically, transfer the file from the local file system + to the node file system. Then Selenium will send the file path, + from to node file system, to the browser. Example: | `Choose File` | my_upload_field | ${CURDIR}/trades.csv | From 94785a12760932c4c45a59d7f42bca2b21bafc32 Mon Sep 17 00:00:00 2001 From: Tatu Aalto <2665023+aaltat@users.noreply.github.com> Date: Tue, 5 Mar 2019 22:49:58 +0200 Subject: [PATCH 2/2] Updated for better wording. --- src/SeleniumLibrary/keywords/formelement.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/SeleniumLibrary/keywords/formelement.py b/src/SeleniumLibrary/keywords/formelement.py index 6077eb043..26fb2542d 100644 --- a/src/SeleniumLibrary/keywords/formelement.py +++ b/src/SeleniumLibrary/keywords/formelement.py @@ -197,10 +197,12 @@ def choose_file(self, locator, file_path): This keyword is most often used to input files into upload forms. The file specified with ``file_path`` must be available on machine - where tests are executed. When using Selenium Grid, Selenium - will, magically, transfer the file from the local file system - to the node file system. Then Selenium will send the file path, - from to node file system, to the browser. + where tests are executed. When using Selenium Grid, Seleniun will, + [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.command.html?highlight=upload#selenium.webdriver.remote.command.Command.UPLOAD_FILE|magically], + transfer the file from the machine where test are executed + to the Selenium Grid node where the browser is running. + Then Selenium will send the file path, from to node file + system, to the browser. Example: | `Choose File` | my_upload_field | ${CURDIR}/trades.csv |