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

Skip to content

Commit 54fcbcc

Browse files
author
Kitty Depa
authored
Grammar edits in the Getting Started page (baijum#107)
* Grammar edits Authored-by: kittydepa <[email protected]>
1 parent 341ca8c commit 54fcbcc

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

source/getting-started.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ completely loaded*::
6060

6161
driver.get("http://www.python.org")
6262

63-
The next line is an assertion to confirm that title has "Python" word in it::
63+
The next line is an assertion to confirm that title has the word "Python" in it::
6464

6565
assert "Python" in driver.title
6666

@@ -73,7 +73,7 @@ chapter::
7373
elem = driver.find_element(By.NAME, "q")
7474

7575
Next, we are sending keys, this is similar to entering keys using your keyboard.
76-
Special keys can be sent using `Keys` class imported from
76+
Special keys can be sent using the `Keys` class imported from
7777
`selenium.webdriver.common.keys`. To be safe, we'll first clear any
7878
pre-populated text in the input field (e.g. "Search") so it doesn't affect our
7979
search results::
@@ -87,9 +87,9 @@ ensure that some results are found, make an assertion::
8787

8888
assert "No results found." not in driver.page_source
8989

90-
Finally, the browser window is closed. You can also call `quit` method instead
91-
of `close`. The `quit` will exit entire browser whereas `close` will close one
92-
tab, but if just one tab was open, by default most browser will exit entirely.::
90+
Finally, the browser window is closed. You can also call the `quit` method instead
91+
of `close`. The `quit` method will exit the browser whereas `close` will close one
92+
tab, but if just one tab was open, by default most browsers will exit entirely.::
9393

9494
driver.close()
9595

@@ -104,7 +104,7 @@ Python's unittest module. The other options for a tool/framework are `pytest
104104
<https://nose.readthedocs.io/en/latest/>`_.
105105

106106
In this chapter, we use `unittest` as the framework of choice. Here is the
107-
modified example which uses unittest module. This is a test for `python.org`
107+
modified example which uses the unittest module. This is a test for the `python.org`
108108
search functionality::
109109

110110
import unittest
@@ -149,17 +149,17 @@ Note: To run the above test in IPython or Jupyter, you should pass a couple of
149149
arguments to the `main` function as shown below::
150150

151151
unittest.main(argv=['first-arg-is-ignored'], exit=False)
152-
152+
153153

154154

155155
Walkthrough of the example
156156
~~~~~~~~~~~~~~~~~~~~~~~~~~
157157

158158
Initially, all the basic modules required are imported. The `unittest
159159
<http://docs.python.org/library/unittest.html>`_ module is a built-in Python
160-
based on Java's JUnit. This module provides the framework for organizing the
160+
module based on Java's JUnit. This module provides the framework for organizing the
161161
test cases. The `selenium.webdriver` module provides all the WebDriver
162-
implementations. Currently supported WebDriver implementations are Firefox,
162+
implementations. Currently supported WebDriver implementations are: Firefox,
163163
Chrome, IE and Remote. The `Keys` class provides keys in the keyboard like
164164
RETURN, F1, ALT etc. The `By` class is used to locate elements within a document.
165165

@@ -171,22 +171,22 @@ RETURN, F1, ALT etc. The `By` class is used to locate elements within a document
171171
from selenium.webdriver.common.by import By
172172

173173
The test case class is inherited from `unittest.TestCase`. Inheriting from
174-
`TestCase` class is the way to tell `unittest` module that this is a test case::
174+
the `TestCase` class is the way to tell `unittest` module that this is a test case::
175175

176176
class PythonOrgSearch(unittest.TestCase):
177177

178178

179-
The `setUp` is part of initialization, this method will get called before every
179+
The `setUp` method is part of initialization. This method will get called before every
180180
test function which you are going to write in this test case class. Here you
181-
are creating the instance of Firefox WebDriver.
181+
are creating an instance of a Firefox WebDriver.
182182

183183
::
184184

185185
def setUp(self):
186186
self.driver = webdriver.Firefox()
187187

188188
This is the test case method. The test case method should always start with
189-
characters `test`. The first line inside this method create a local reference
189+
characters `test`. The first line inside this method creates a local reference
190190
to the driver object created in `setUp` method.
191191

192192
::
@@ -202,7 +202,7 @@ completely loaded*::
202202

203203
driver.get("http://www.python.org")
204204

205-
The next line is an assertion to confirm that title has "Python" word in it::
205+
The next line is an assertion to confirm that title has the word "Python" in it::
206206

207207
self.assertIn("Python", driver.title)
208208

@@ -216,7 +216,7 @@ chapter::
216216
elem = driver.find_element(By.NAME, "q")
217217

218218
Next, we are sending keys, this is similar to entering keys using your keyboard.
219-
Special keys can be send using `Keys` class imported from
219+
Special keys can be sent using the `Keys` class imported from
220220
`selenium.webdriver.common.keys`::
221221

222222
elem.send_keys("pycon")
@@ -229,9 +229,9 @@ is any. To ensure that some results are found, make an assertion::
229229

230230
The `tearDown` method will get called after every test method. This is a place
231231
to do all cleanup actions. In the current method, the browser window is closed.
232-
You can also call `quit` method instead of `close`. The `quit` will exit the
232+
You can also call the `quit` method instead of `close`. The `quit` method will exit the
233233
entire browser, whereas `close` will close a tab, but if it is the only tab
234-
opened, by default most browser will exit entirely.::
234+
opened, by default most browsers will exit entirely.::
235235

236236
def tearDown(self):
237237
self.driver.close()
@@ -246,7 +246,7 @@ Final lines are some boiler plate code to run the test suite::
246246
Using Selenium with remote WebDriver
247247
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
248248

249-
To use the remote WebDriver, you should have Selenium server running. To run
249+
To use the remote WebDriver, you should have the Selenium server running. To run
250250
the server, use this command::
251251

252252
java -jar selenium-server-standalone-2.x.x.jar
@@ -255,7 +255,7 @@ While running the Selenium server, you could see a message looking like this::
255255

256256
15:43:07.541 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
257257

258-
The above line says that you can use this URL for connecting to remote
258+
The above line says that you can use this URL for connecting to the remote
259259
WebDriver. Here are some examples::
260260

261261
from selenium import webdriver
@@ -273,7 +273,7 @@ WebDriver. Here are some examples::
273273
command_executor='http://127.0.0.1:4444/wd/hub',
274274
desired_capabilities=DesiredCapabilities.HTMLUNITWITHJS)
275275

276-
The desired capabilities is a dictionary, so instead of using the default
276+
The desired capabilities is a dictionary. So instead of using the default
277277
dictionaries, you can specify the values explicitly::
278278

279279
driver = webdriver.Remote(

0 commit comments

Comments
 (0)