@@ -96,8 +96,9 @@ Using Selenium to write tests
96
96
97
97
Selenium is mostly used for writing test cases. The `selenium ` package itself
98
98
doesn't provide a testing tool/framework. You can write test cases using
99
- Python's unittest module. The other options for a tool/framework are `pytest <https://docs.pytest.org/en/stable/ >`_
100
- and `nose <https://nose.readthedocs.io/en/latest/ >`_.
99
+ Python's unittest module. The other options for a tool/framework are `pytest
100
+ <https://docs.pytest.org/en/stable/> `_ and `nose
101
+ <https://nose.readthedocs.io/en/latest/> `_.
101
102
102
103
In this chapter, we use `unittest ` as the framework of choice. Here is the
103
104
modified example which uses unittest module. This is a test for `python.org `
@@ -140,8 +141,8 @@ You can run the above test case from a shell like this::
140
141
141
142
The above result shows that the test has been successfully completed.
142
143
143
- Note: To run the above test in IPython or Jupyter, you should pass a couple of arguments to the ` main ` function as shown below:
144
- ::
144
+ Note: To run the above test in IPython or Jupyter, you should pass a couple of
145
+ arguments to the ` main ` function as shown below ::
145
146
146
147
unittest.main(argv=['first-arg-is-ignored'], exit=False)
147
148
@@ -190,7 +191,7 @@ to the driver object created in `setUp` method.
190
191
191
192
The `driver.get ` method will navigate to a page given by the URL. WebDriver
192
193
will wait until the page has fully loaded (that is, the "onload" event has
193
- fired) before returning control to your test or script. *Be aware that if your
194
+ fired) before returning control to your test or script. *Be aware that if your
194
195
page uses a lot of AJAX on load then WebDriver may not know when it has
195
196
completely loaded *::
196
197
0 commit comments