File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
selenium/webdriver/firefox
test/selenium/webdriver/firefox Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -99,12 +99,12 @@ def quit(self):
99
99
self .service .stop ()
100
100
else :
101
101
self .binary .kill ()
102
- try :
103
- shutil .rmtree (self .profile .path )
104
- if self .profile .tempfolder is not None :
105
- shutil .rmtree (self .profile .tempfolder )
106
- except Exception as e :
107
- print (str (e ))
102
+ try :
103
+ shutil .rmtree (self .profile .path )
104
+ if self .profile .tempfolder is not None :
105
+ shutil .rmtree (self .profile .tempfolder )
106
+ except Exception as e :
107
+ print (str (e ))
108
108
109
109
@property
110
110
def firefox_profile (self ):
Original file line number Diff line number Diff line change 15
15
# specific language governing permissions and limitations
16
16
# under the License.
17
17
18
+ import os
19
+
18
20
import pytest
19
21
from selenium import webdriver
20
22
from selenium .webdriver .common .desired_capabilities import DesiredCapabilities
@@ -47,3 +49,9 @@ def profile():
47
49
48
50
def test_profile_is_used (driver ):
49
51
assert 'about:' == driver .current_url
52
+
53
+
54
+ def test_profile_is_deleted (driver , profile ):
55
+ assert os .path .exists (profile .path )
56
+ driver .quit ()
57
+ assert not os .path .exists (profile .path )
You can’t perform that action at this time.
0 commit comments