Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. public void Start()
  2. {
  3. this.driverServiceProcess = new Process();
  4. if (this.user != null)
  5. {
  6. this.driverServiceProcess.StartInfo.UserName = user.Name;
  7. this.driverServiceProcess.StartInfo.Password = user.Password;
  8. this.driverServiceProcess.StartInfo.Domain = user.Domain;
  9. }
  10. this.driverServiceProcess.StartInfo.FileName = Path.Combine(this.driverServicePath, this.driverServiceExecutableName);
  11. this.driverServiceProcess.StartInfo.Arguments = this.CommandLineArguments;
  12. this.driverServiceProcess.StartInfo.UseShellExecute = false;
  13. this.driverServiceProcess.StartInfo.CreateNoWindow = this.hideCommandPromptWindow;
  14. this.driverServiceProcess.Start();
  15. bool serviceAvailable = this.WaitForServiceInitialization();
  16.  
  17. if (!serviceAvailable)
  18. {
  19. string msg = "Cannot start the driver service on " + this.ServiceUrl;
  20. throw new WebDriverException(msg);
  21. }
  22. }
  23.  
  24. new ChromeDriver(userName, password, domain);
  25.  
  26. new InternetExplorerDriver(ieOptions, userName, password, domain);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement