Skip to content

Commit b6c956a

Browse files
committed
Updated given code
Removed self.assertIn("Google", driver.title) from given code because when we search for "selenium" keyword in http://www.python.org it is not getting redirected to Google.com. So given example is failing because of "self.assertIn("Python", driver.title)"
1 parent 55aa1ee commit b6c956a

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

‎source/getting-started.rst‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ from Python like this.
2020
elem = driver.find_element_by_name("q")
2121
elem.send_keys("selenium")
2222
elem.send_keys(Keys.RETURN)
23-
assert "Google" in driver.title
2423
driver.close()
2524

2625
The above script can be saved into a file (eg:-
@@ -78,10 +77,7 @@ keyboard. Special keys can be send using `Keys` class imported from
7877
elem.send_keys("selenium")
7978
elem.send_keys(Keys.RETURN)
8079

81-
After submission of the page, you should be reached in the Google
82-
site::
83-
84-
assert "Google" in driver.title
80+
After submission of the page, you should get the resulf if there is any::
8581

8682
Finally, the browser window is closed. You can also call `quit`
8783
method instead of `close`. The `quit` will exit entire browser where
@@ -119,7 +115,6 @@ for `python.org` search functionality::
119115
elem = driver.find_element_by_name("q")
120116
elem.send_keys("selenium")
121117
elem.send_keys(Keys.RETURN)
122-
self.assertIn("Google", driver.title)
123118

124119
def tearDown(self):
125120
self.driver.close()
@@ -215,10 +210,8 @@ keyboard. Special keys can be send using `Keys` class imported from
215210
elem.send_keys("selenium")
216211
elem.send_keys(Keys.RETURN)
217212

218-
After submission of the page, you should be reached in the Google
219-
site. You can confirm it by asserting "Google" in the title::
220-
221-
self.assertIn("Google", driver.title)
213+
After submission of the page, you should get result as per search if
214+
there is any.
222215

223216
The `tearDown` method will get called after every test method. This
224217
is a place to do all cleanup actions. In the current method, the

0 commit comments

Comments
 (0)