You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,19 @@ to crawl websites... and almost everything that you can do with chrome as a huma
69
69
$browser->close();
70
70
```
71
71
72
+
### Using different chrome executable
73
+
74
+
When starting the factory will look for the environment variable ``"CHROME_PATH"`` to find the chrome executable.
75
+
If the variable is not found then it will use ``"chrome"`` as the executable.
76
+
77
+
You can use an arbitrary executable of your choice. For instance ``"chromium-browser"``:
78
+
79
+
```php
80
+
use HeadlessChromium\BrowserFactory;
81
+
82
+
// replace default 'chrome' with 'chromium-browser'
83
+
$browserFactory = new BrowserFactory('chromium-browser');
84
+
```
72
85
73
86
### Debugging
74
87
@@ -89,16 +102,6 @@ The following example adds some development-oriented features to help debugging
89
102
About ``debugLogger``: this can be any of a resource string, a resource or an object implementing ``LoggerInterface`` from Psr\Log (such as [monolog](https://github.com/Seldaek/monolog) or [apix/log](https://github.com/apix/log)).
90
103
91
104
92
-
### Using different chrome executable
93
-
94
-
By default we assume that chrome will run with the command ``chrome`` but you can change the executable:
95
-
96
-
```php
97
-
use HeadlessChromium\BrowserFactory;
98
-
99
-
// replace default 'chrome' with 'chromium-browser'
100
-
$browserFactory = new BrowserFactory('chromium-browser');
0 commit comments