Created
March 27, 2018 16:49
-
-
Save dborin/d5cf25951472e85f2a37ebe39292b705 to your computer and use it in GitHub Desktop.
upload file error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
InvalidArgumentException Traceback (most recent call last) | |
<ipython-input-27-be9256a138d3> in <module>() | |
1 for el in driver.find_elements(by='css selector', value='dh-location-origin .btn'): | |
2 if re.search("Upload File", el.text): | |
----> 3 el.find_element_by_css_selector('.multi-files').send_keys('/home/dborin/cusack.png') | |
4 | |
/Users/dborin/.python_virtualenvs/env1/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.pyc in send_keys(self, *value) | |
477 self._execute(Command.SEND_KEYS_TO_ELEMENT, | |
478 {'text': "".join(keys_to_typing(value)), | |
--> 479 'value': keys_to_typing(value)}) | |
480 | |
481 # RenderedWebElement Items | |
/Users/dborin/.python_virtualenvs/env1/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.pyc in _execute(self, command, params) | |
626 params = {} | |
627 params['id'] = self._id | |
--> 628 return self._parent.execute(command, params) | |
629 | |
630 def find_element(self, by=By.ID, value=None): | |
/Users/dborin/.python_virtualenvs/env1/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.pyc in execute(self, driver_command, params) | |
310 response = self.command_executor.execute(driver_command, params) | |
311 if response: | |
--> 312 self.error_handler.check_response(response) | |
313 response['value'] = self._unwrap_value( | |
314 response.get('value', None)) | |
/Users/dborin/.python_virtualenvs/env1/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.pyc in check_response(self, response) | |
240 alert_text = value['alert'].get('text') | |
241 raise exception_class(message, screen, stacktrace, alert_text) | |
--> 242 raise exception_class(message, screen, stacktrace) | |
243 | |
244 def _value_or_default(self, obj, key, default): | |
InvalidArgumentException: Message: File not found: /home/dborin/cusack.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment