question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Choose File not working when running against a remote machine.

See original GitHub issue

Summary

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:closed
  • Created 3 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
djl197commented, Jul 17, 2020

Fixed 👍 Proved in our setup - great job, thankyou

0reactions
aaltatcommented, Jul 16, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix 8 common remote desktop connection problems
Open the Control Panel by entering Control at the Windows Run prompt; Click System and Security; Click Windows Defender Firewall; Click Allow an ......
Read more >
pycharm ssh interpter No such file or directory - Stack Overflow
To execute your code on remote machine you'll have to perform few steps ... Right click on file you want to run and...
Read more >
Remote desktop connection "The local policy of this system ...
To fix this problem automatically, click the Fix it button or link. Click Run in the File Download dialog box, and follow the...
Read more >
Remote Tunnels - Visual Studio Code
This can eliminate the need for source code to be on your VS Code client machine since the extension runs commands and other...
Read more >
Choose how to control and observe in Remote Desktop
By default, when you control or observe a client computer, you see exactly what the remote user sees. If you want to administer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found