Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions source/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ from Python like this.
driver.get("http://www.python.org")
assert "Python" in driver.title
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
Expand All @@ -36,7 +37,7 @@ Example Explained

The `selenium.webdriver` module provides all the WebDriver
implementations. Currently supported WebDriver implementations are
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The WebDriver module name is Ie.

Firefox, Chrome, Ie and Remote. The `Keys` class provide keys in the
Firefox, Chrome, IE and Remote. The `Keys` class provide keys in the
keyboard like RETURN, F1, ALT etc.

::
Expand Down Expand Up @@ -73,8 +74,11 @@ method. Detailed explanation of finding elements is available in the

Next we are sending keys, this is similar to entering keys using your
keyboard. Special keys can be send using `Keys` class imported from
`selenium.webdriver.common.keys`::
`selenium.webdriver.common.keys`. To be safe, we'll first clear any
prepopulated text in the input field (e.g. "Search") so it doesn't
affect our search results.

elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)

Expand Down