Skip to content

Commit

Permalink
grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
baijum committed Aug 14, 2017
1 parent ebef43a commit 238f7d6
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
13 changes: 7 additions & 6 deletions source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ WebDriver API
is available `here
<https://seleniumhq.github.io/selenium/docs/api/py/api.html>`_.

This chapter cover all the interfaces of Selenium WebDriver.
This chapter covers all the interfaces of Selenium WebDriver.


**Recommended Import Style**

The API definitions in this chapter shows the absolute location of classes.
However the recommended import style is as given below::
The API definitions in this chapter show the absolute location of classes.
However, the recommended import style is as given below::

from selenium import webdriver

Expand All @@ -38,7 +38,8 @@ The special keys class (``Keys``) can be imported like this::

from selenium.webdriver.common.keys import Keys

The exception classes can be imported like this (Replace the ``TheNameOfTheExceptionClass`` with actual class name given below)::
The exception classes can be imported like this (Replace the ``TheNameOfTheExceptionClass``
with the actual class name given below)::

from selenium.common.exceptions import [TheNameOfTheExceptionClass]

Expand All @@ -52,13 +53,13 @@ Here is an example for property:

- current_url

URL of the current loaded page.
URL of the currently loaded page.

Usage::

driver.current_url

Here is an example for a method:
Here is an example of a method:

- close()

Expand Down
10 changes: 5 additions & 5 deletions source/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ in it::
WebDriver offers a number of ways to find elements using one of the
`find_element_by_*` methods. For example, the input text element can
be located by its `name` attribute using `find_element_by_name`
method. Detailed explanation of finding elements is available in the
method. A detailed explanation of finding elements is available in the
:ref:`locating-elements` chapter::

elem = driver.find_element_by_name("q")

Next we are sending keys, this is similar to entering keys using your
Next, we are sending keys, this is similar to entering keys using your
keyboard. Special keys can be sent using `Keys` class imported from
`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
pre-populated text in the input field (e.g. "Search") so it doesn't
affect our search results::

elem.clear()
Expand Down Expand Up @@ -210,14 +210,14 @@ method. Detailed explanation of finding elements is available in the

elem = driver.find_element_by_name("q")

Next we are sending keys, this is similar to entering keys using your
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`::

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

After submission of the page, you should get result as per search if
After submission of the page, you should get the result as per search if
there is any. To ensure that some results are found, make an
assertion::

Expand Down
8 changes: 4 additions & 4 deletions source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Detailed instructions for Windows users

.. Note::

You should have internet connection to perform this installation.
You should have an internet connection to perform this installation.

1. Install Python 3.6 using the `MSI available in python.org download
page <http://www.python.org/download>`_.
Expand All @@ -87,7 +87,7 @@ Downloading Selenium server

.. note::

**The Selenium server is only required, if you want to use the remote
**The Selenium server is only required if you want to use the remote
WebDriver**. See the :ref:`selenium-remote-webdriver` section for
more details. If you are a beginner learning Selenium, you can
skip this section and proceed with next chapter.
Expand All @@ -112,13 +112,13 @@ you can start the Selenium server using this command::

java -jar selenium-server-standalone-2.x.x.jar

Replace `2.x.x` with actual version of Selenium server you downloaded
Replace `2.x.x` with the actual version of Selenium server you downloaded
from the site.

If JRE is installed as a non-root user and/or if it is
not available in the PATH (environment variable), you can type the
relative or absolute path to the `java` command. Similarly, you can
provide relative or absolute path to Selenium server jar file.
provide a relative or absolute path to Selenium server jar file.
Then, the command will look something like this::

/path/to/java -jar /path/to/selenium-server-standalone-2.x.x.jar
16 changes: 8 additions & 8 deletions source/navigating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ possible to test keyboard shortcuts such as those used on GMail. A
side-effect of this is that typing something into a text field won't
automatically clear it. Instead, what you type will be appended to
what's already there. You can easily clear the contents of a text
field or textarea with `clear` method::
field or textarea with the `clear` method::

element.clear()

Expand All @@ -73,7 +73,7 @@ Filling in forms
~~~~~~~~~~~~~~~~

We've already seen how to enter text into a textarea or text field,
but what about the other elements? You can "toggle" the state of
but what about the other elements? You can "toggle" the state of the
drop down, and you can use "setSelected" to set something like an
`OPTION` tag selected. Dealing with `SELECT` tags isn't too bad::

Expand All @@ -88,8 +88,8 @@ through each of it's OPTIONs in turn, printing out their values, and
selecting each in turn.

As you can see, this isn't the most efficient
way of dealing with SELECT elements . WebDriver's support classes
include one called "Select", which provides useful methods for
way of dealing with SELECT elements. WebDriver's support classes
include one called a "Select", which provides useful methods for
interacting with these::

from selenium.webdriver.support.ui import Select
Expand Down Expand Up @@ -188,12 +188,12 @@ Popup dialogs
~~~~~~~~~~~~~

Selenium WebDriver has built-in support for handling popup dialog
boxes. After you've triggerd action that would open a popup, you
boxes. After you've triggered action that would open a popup, you
can access the alert with the following::

alert = driver.switch_to_alert()

This will return the currently open alert object. With this object
This will return the currently open alert object. With this object,
you can now accept, dismiss, read its contents or even type into a
prompt. This interface works equally well on alerts, confirms,
prompts. Refer to the API documentation for more information.
Expand All @@ -209,14 +209,14 @@ useful task. To navigate to a page, you can use `get` method::

driver.get("http://www.example.com")

To move backwards and forwards in your browser's history::
To move backward and forward in your browser's history::

driver.forward()
driver.back()

Please be aware that this functionality depends entirely on the
underlying driver. It's just possible that something unexpected may
happen when you call these methods if you're used to the behaviour of
happen when you call these methods if you're used to the behavior of
one browser over another.


Expand Down
2 changes: 1 addition & 1 deletion source/waits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trying to locate an element.
Explicit Waits
~~~~~~~~~~~~~~

An explicit wait is code you define to wait for a certain condition
An explicit wait is a code you define to wait for a certain condition
to occur before proceeding further in the code. The extreme case of
this is time.sleep(), which sets the condition to an exact time period
to wait. There are some convenience methods provided that help you
Expand Down

0 comments on commit 238f7d6

Please sign in to comment.