Choose File not working when running against a remote machine.
See original GitHub issueSummary
My issue is very similar to #1551
My code currently uses library version 3.3 and this works as expected.
However when I upgrade to version 4.3 I get this error (much like #1551).
12:32:10.084 DEBUG Page contains element //div[@id='import_license_dialog']/*//input[@type='file']
12:32:10.084 INFO Sending /tmp/license_to_import to browser.
12:32:10.084 DEBUG POST http://<ipaddr>:24444/wd/hub/session/7191f3c4a5518c37b417031f7e3f8080/elements {"using": "xpath", "value": "//div[@id='import_license_dialog']/*//input[@type='file']", "sessionId": "7191f3c4a5518c37b417031f7e3f8080"}
12:32:10.107 DEBUG Finished Request
12:32:10.107 DEBUG POST http://<ipaddr>:24444/wd/hub/session/7191f3c4a5518c37b417031f7e3f8080/element/0.06728975866412834-4/value {"text": "/tmp/license_to_import", "value": ["/", "t", "m", "p", "/", "l", "i", "c", "e", "n", "s", "e", "_", "t", "o", "_", "i", "m", "p", "o", "r", "t"], "id": "0.06728975866412834-4", "sessionId": "7191f3c4a5518c37b417031f7e3f8080"}
12:32:10.143 DEBUG Finished Request
12:32:10.186 FAIL InvalidArgumentException: Message: invalid argument: File not found : /tmp/license_to_import
(Session info: chrome=72.0.3626.121)
(Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.4.0-164-generic x86_64)
12:32:10.186 DEBUG Traceback (most recent call last):
File "/home/jenkins/.local/lib/python3.6/site-packages/MkLibrary/keywords.py", line 177, in import_license_file
selenium_lib.import_license()
File "/home/jenkins/.local/lib/python3.6/site-packages/MkLibrary/keywords.py", line 95, in import_license
self.get_sl().choose_file(choose_file_locator, '/tmp/license_to_import')
File "/usr/local/lib/python3.6/dist-packages/SeleniumLibrary/keywords/formelement.py", line 216, in choose_file
self.find_element(locator).send_keys(file_path)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webelement.py", line 479, in send_keys
'value': keys_to_typing(value)})
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
12:26:06.031 TRACE Arguments: [ ]
For issues
Steps to reproduce the issue
I try to upload the file as part of Setup Teardown in a Robot Framework test.
Error messages and additional information
See above for the error trace.
Expected behavior and actual behavior
Environment
Browser: Name and version (Usually available from the about dialogue.) Browser driver: Name and version Operating System: Name and version (Linux, Ubuntu 18.04) Libraries
- Robot Framework: 3.1.2
- Selenium: 3.141
- SeleniumLibrary: 4.3.0
This project is not funded by any organisation or company, I do this because I want to do this on my own free time. Therefore if you want feature be implemented, the easiest and usually fastest way usually is to provide pull request. See https://github.com/robotframework/SeleniumLibrary/blob/master/CONTRIBUTING.rst for mode details about project development.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (8 by maintainers)
Top GitHub Comments
Fixed 👍 Proved in our setup - great job, thankyou
RC2 is already out https://pypi.org/project/robotframework-seleniumlibrary/4.5.0rc2/