@@ -84,8 +84,8 @@ To ensure that some results are found, make an assertion::
84
84
assert "No results found." not in driver.page_source
85
85
86
86
Finally, the browser window is closed. You can also call `quit `
87
- method instead of `close `. The `quit ` will exit entire browser where
88
- as ` close ` will close one tab, but if it just one tab, by default most
87
+ method instead of `close `. The `quit ` will exit entire browser whereas
88
+ close` will close one tab, but if just one tab was open , by default most
89
89
browser will exit entirely.::
90
90
91
91
driver.close()
@@ -96,7 +96,7 @@ Using Selenium to write tests
96
96
97
97
Selenium is mostly used for writing test cases. The `selenium `
98
98
package itself doesn't provide a testing tool/framework. You can
99
- write test cases using Python's unittest module. The other choices as
99
+ write test cases using Python's unittest module. The other options for
100
100
a tool/framework are py.test and nose.
101
101
102
102
In this chapter, we use `unittest ` as the framework of choice. Here
@@ -137,7 +137,7 @@ You can run the above test case from a shell like this::
137
137
138
138
OK
139
139
140
- The above results shows that, the test has been successfully
140
+ The above result shows that the test has been successfully
141
141
completed.
142
142
143
143
@@ -160,7 +160,7 @@ provide keys in the keyboard like RETURN, F1, ALT etc.
160
160
161
161
The test case class is inherited from `unittest.TestCase `.
162
162
Inheriting from `TestCase ` class is the way to tell `unittest ` module
163
- that, this is a test case::
163
+ that this is a test case::
164
164
165
165
class PythonOrgSearch(unittest.TestCase):
166
166
@@ -221,9 +221,9 @@ assertion::
221
221
The `tearDown ` method will get called after every test method. This
222
222
is a place to do all cleanup actions. In the current method, the
223
223
browser window is closed. You can also call `quit ` method instead of
224
- `close `. The `quit ` will exit entire browser, where as `close `
225
- will close a tab, but if it is just one tab, by default most browser
226
- will exit entirely.::
224
+ `close `. The `quit ` will exit the entire browser, whereas `close `
225
+ will close a tab, but if it is the only tab opened , by default most
226
+ browser will exit entirely.::
227
227
228
228
def tearDown(self):
229
229
self.driver.close()
@@ -243,12 +243,12 @@ To run the server, use this command::
243
243
244
244
java -jar selenium-server-standalone-2.x.x.jar
245
245
246
- While running the Selenium server, you could see a message looks like
246
+ While running the Selenium server, you could see a message looking like
247
247
this::
248
248
249
249
15:43:07.541 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
250
250
251
- The above line says that, you can use this URL for connecting to
251
+ The above line says that you can use this URL for connecting to
252
252
remote WebDriver. Here are some examples::
253
253
254
254
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
0 commit comments