C
C
chornoy2016-08-18 10:51:25
Automation
chornoy, 2016-08-18 10:51:25

How to solve problem with python selenium?

I want to try to start writing autotests using selenium in python. I did everything so to nada, the pip command was like everything should go well, that's not a problem, when we run the test, this is what we get: prntscr.com/c76pfu. I really need help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chornoy, 2016-08-18
@chornoy

here is the test code :from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get(" 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()
seems to be correct

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question