File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,16 @@ class bcolors:
2828chromeOps .add_extension (sys .argv [1 ])
2929chromeOps .add_argument ("--disable-setuid-sandbox" )
3030
31- chromdriver_path = "chromedriver"
31+ chromedriver_path = "chromedriver"
3232
3333if 'TRAVIS' in os .environ :
3434 chromeOps .add_argument ('--no-sandbox' )
35- chromdriver_path = os .path .abspath ("test/chromium/chromedriver" )
35+ chromedriver_path = os .path .abspath ("test/chromium/chromedriver" )
3636
3737# First argument is optional, if not specified will search path.
3838
3939try :
40- driver = webdriver .Chrome (chromdriver_path , chrome_options = chromeOps )
40+ driver = webdriver .Chrome (chromedriver_path , chrome_options = chromeOps )
4141except WebDriverException as e :
4242 error = e .__str__ ()
4343
@@ -55,12 +55,18 @@ class bcolors:
5555
5656#Page Loaded
5757
58+ failed = False
5859if driver .current_url .startswith ('https' ):
5960 print bcolors .OKGREEN + "HTTP to HTTPS redirection successful" + bcolors .ENDC
6061elif driver .current_url .startswith ('http' ):
6162 print bcolors .FAIL + "HTTP to HTTPS redirection failed" + bcolors .ENDC
63+ failed = True
6264 sys .exit (1 )
6365
6466print '' #New line
6567
6668driver .quit ()
69+
70+
71+ if failed :
72+ sys .exit (1 )
You can’t perform that action at this time.
0 commit comments