Answer the question
In order to leave comments, you need to log in
Why does ImportError: cannot import name 'webdriver' occur?
Hello.
I decided to try the WEB testing tool.
The choice fell on Selenium for python.
did the package installation pip install selenium selenium (3.4.0)
python version
pip 9.0.1 from c:\python36\lib\site-packages (python 3.6)
2017-04-22 05:34:15.941:INFO:osjs.AbstractConnector:main: Started [email protected]{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
#!/usr/bin/python
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
Traceback (most recent call last):
File "C:/Server/repositories/um/templates/Test/selenium.py", line 2, in <module>
from selenium import webdriver
File "C:\Server\repositories\um\templates\Test\selenium.py", line 2, in <module>
from selenium import webdriver
ImportError: cannot import name 'webdriver'
Answer the question
In order to leave comments, you need to log in
Just. All such effects are, in most cases, based on :hover + trasition
selector {
rule1: $value1_1;
rule2: $value2_1;
...
ruleN: $valueN_1;
transition: all $transition_time;
&:hover {
rule1: $value1_2;
rule2: $value2_2;
...
ruleN: $valueN_2;
}
}
the problem was i called my script selenium.py
renaming solved the problem
stackoverflow.com/questions/7426851/trying-to-use-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question