Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
05669fad
Commit
05669fad
authored
Oct 02, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch WebDriver exceptions when creating selenium browser
parent
a3525875
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
common/djangoapps/terrain/browser.py
+6
-4
No files found.
common/djangoapps/terrain/browser.py
View file @
05669fad
...
...
@@ -99,16 +99,18 @@ def initial_setup(server):
success
=
False
num_attempts
=
0
while
(
not
success
)
and
num_attempts
<
MAX_VALID_BROWSER_ATTEMPTS
:
world
.
browser
=
Browser
(
browser_driver
)
# Try to visit the main page
# If the browser session is invalid, this will
# Load the browser and try to visit the main page
# If the browser couldn't be reached or
# the browser session is invalid, this will
# raise a WebDriverException
try
:
world
.
browser
=
Browser
(
browser_driver
)
world
.
visit
(
'/'
)
except
WebDriverException
:
world
.
browser
.
quit
()
if
hasattr
(
world
,
'browser'
):
world
.
browser
.
quit
()
num_attempts
+=
1
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment