File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed 
dotnet/src/webdriver/Firefox Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,11 @@ protected override DriverOptions GetDefaultDriverOptions()
107107    /// Disable truncation of long log lines in GeckoDriver. 
108108    /// </summary> 
109109    public  bool  LogTruncate  {  get ;  set ;  } 
110+     
111+     /// <summary> 
112+     /// Directory in which GeckoDriver creates profiles. 
113+     /// </summary> 
114+     public  string ?  ProfileRoot  {  get ;  set ;  } 
110115
111116    /// <summary> 
112117    /// Gets or sets the level at which log output is displayed. 
@@ -199,6 +204,16 @@ protected override string CommandLineArguments
199204                argsBuilder . Append ( " --log-no-truncate" ) ; 
200205            } 
201206
207+             if  ( ! string . IsNullOrEmpty ( this . ProfileRoot ) ) 
208+             { 
209+                 if  ( ! Directory . Exists ( this . ProfileRoot ) ) 
210+                 { 
211+                     throw  new  ArgumentException ( $ "Profile root directory does not exist: { this . ProfileRoot } ",  nameof ( ProfileRoot ) ) ; 
212+                 } 
213+     
214+                 argsBuilder . AppendFormat ( CultureInfo . InvariantCulture ,  " --profile-root \" {0}\" " ,  this . ProfileRoot ) ; 
215+             }             
216+ 
202217            return  argsBuilder . ToString ( ) . Trim ( ) ; 
203218        } 
204219    } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments