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):
9999 self .service .stop ()
100100 else :
101101 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 ))
108108
109109 @property
110110 def firefox_profile (self ):
Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations
1616# under the License.
1717
18+ import os
19+
1820import pytest
1921from selenium import webdriver
2022from selenium .webdriver .common .desired_capabilities import DesiredCapabilities
@@ -47,3 +49,9 @@ def profile():
4749
4850def test_profile_is_used (driver ):
4951 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