N
N
Nikolay Baranenko2017-04-22 06:15:29
css
Nikolay Baranenko, 2017-04-22 06:15:29

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)

started selenium server on localhost
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}

found the first code
#!/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()

tried to execute and got an error
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'

How to solve this problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton Spirin, 2018-05-09
@borgore

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;
  }
}

As I understand it, religion does not allow you to look into the developer panel and see for yourself, apparently.

V
Vladimir, 2018-05-09
@Casufi

This is not a border
screen

N
Nikolay Baranenko, 2017-04-22
@drno-reg

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 question

Ask a Question

731 491 924 answers to any question