ChromeProcess.php 769 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Tests;
  3. use Laravel\Dusk\Chrome\ChromeProcess as BaseChromeProcess;
  4. class ChromeProcess extends BaseChromeProcess
  5. {
  6. public function __construct($driver = null)
  7. {
  8. parent::__construct($driver);
  9. if ($this->onWindows()) {
  10. $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-win.exe');
  11. }
  12. //elseif ($this->onMac()) {
  13. // $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-mac');
  14. //} else {
  15. // if (is_file('/usr/bin/google-chrome')) {
  16. // $this->driver = '/usr/bin/google-chrome';
  17. // } else {
  18. // $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-linux');
  19. // }
  20. //}
  21. }
  22. }