File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
py/selenium/webdriver/remote Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1414# KIND, either express or implied. See the License for the
1515# specific language governing permissions and limitations
1616# under the License.
17+
1718"""The WebDriver implementation."""
19+
1820import base64
1921import contextlib
2022import copy
@@ -348,8 +350,9 @@ def start_session(self, capabilities: dict) -> None:
348350 response = self .execute (Command .NEW_SESSION , caps )["value" ]
349351 self .session_id = response .get ("sessionId" )
350352 self .caps = response .get ("capabilities" )
351- except SessionNotCreatedException :
352- self .service .stop ()
353+ except (SessionNotCreatedException , WebDriverException ):
354+ if self .service is not None :
355+ self .service .stop ()
353356 raise
354357
355358 def _wrap_value (self , value ):
You can’t perform that action at this time.
0 commit comments