0

I am facing the following error, while running the python script with Selenium. Kindly help me to solve this.

(Traceback (most recent call last):
File "C:\Users\WaheGuru\workspace\test\new\first.py", line 8, in <module>     
from selenium.common.keys import Keys ModuleNotFoundError: No module named 
'selenium.common.keys')
1
  • Is selenium installed on your system? What happens if you try just import selenium? Commented May 12, 2017 at 18:20

1 Answer 1

1

Well if you have Python and selenium installed... then something like this should work.

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

def someCode():
#Some Code to do something with some URL
    elem = driver.find_element_by_name("<Some_Elem_With_Input>")
    elem.send_keys("FOO")
    elem.send_keys(Keys.RETURN)

if selenium is not installed then run the following command

pip install selenium

Check out http://selenium-python.readthedocs.io/installation.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.