5

I created a Python webdriver program, I used send_keys and I've got this error:

Traceback (most recent call last):
  File "D:/Amazon FBA/amazon-100-botzi/templates/send_keys_v2.py", line 10, in <module>
    elem.clear()
  File "C:\Users\Andrei\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 95, in clear
    self._execute(Command.CLEAR_ELEMENT)
  File "C:\Users\Andrei\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 628, in _execute
    return self._parent.execute(command, params)
  File "C:\Users\Andrei\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Andrei\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: call function result missing 'value'
  (Session info: chrome=65.0.3325.181)
  (Driver info: chromedriver=2.29.461591 (62ebf098771772160f391d75e589dc567915b233),platform=Windows NT 10.0.16299 x86_64)

Is it about the chrome webdriver version or chrome version? What version should I use? How can I solve this problem? I attached the code. I will appreciate any help.

from selenium import webdriver
from time import sleep
from selenium.webdriver.common.keys import Keys

driver = webdriver.Chrome(executable_path="C:\\Users\Andrei\Downloads\webdriver\chromedriver.exe")

driver.get("http://www.python.org")

elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
Keyur Potdar
  • 6,669
  • 6
  • 23
  • 36
ryy77
  • 746
  • 1
  • 10
  • 25
  • In which line are you getting the error? Can you share the full traceback? – Keyur Potdar Mar 23 '18 at 11:29
  • When I run the program it said line 10. But I think the problem is on the lines with send_keys. The url will open but it didn't enter the value in the textbox. – ryy77 Mar 23 '18 at 11:32
  • It'll help if you add the complete traceback in the question. – Keyur Potdar Mar 23 '18 at 11:33
  • I will edit now – ryy77 Mar 23 '18 at 11:34
  • Yes. But what version? 2.36? I tried but it doesn't work. Is it about the chrome browser version? – ryy77 Mar 23 '18 at 11:37
  • Did you try [this link](https://chromedriver.storage.googleapis.com/index.html?path=2.36/)? It worked for me. – Keyur Potdar Mar 23 '18 at 11:39
  • I used the terminal command to see the chromedriver version(this command chromedriver) and I've got: Starting ChromeDriver 2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91) on port 9515. So the version is 2.36 I think. – ryy77 Mar 23 '18 at 11:43
  • I will mention that yesterday this script worked and now it doesn't. Why? – ryy77 Mar 23 '18 at 11:44
  • 1
    FYI: I was able to reproduce your problem on my machine. After I installed the chromedriver from [this link](https://chromedriver.storage.googleapis.com/index.html?path=2.36/), the problem was solved. – Keyur Potdar Mar 23 '18 at 11:47
  • I will try to install again. Thank you for help! – ryy77 Mar 23 '18 at 11:48

0 Answers0