Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Fix ChromeDriverCommand for ChromeDriver 115+ #1043

Merged
merged 9 commits into from
Jul 24, 2023
Merged

[7.x] Fix ChromeDriverCommand for ChromeDriver 115+ #1043

merged 9 commits into from
Jul 24, 2023

Conversation

crynobone
Copy link
Member

@crynobone crynobone commented Jul 22, 2023

fixes #1040

*
* @var string
*/
protected $downloadUrl = 'https://chromedriver.storage.googleapis.com/%s/chromedriver_%s.zip';
Copy link
Member Author

@crynobone crynobone Jul 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URLs will be hardcoded based on usage to support different version.

'mac-intel' => 'mac64',
'mac-arm' => 'mac_arm64',
'win' => 'win32',
];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to OperatingSystem, use OperatingSystem::chromeDriverSlug($os).

'win' => [
'reg query "HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon" /v version',
],
];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to OperatingSystem, use OperatingSystem::chromeVersionCommands($os).

'slug' => 'mac-arm64',
'commands' => [
'/Applications/Google\ Chrome\ for\ Testing.app/Contents/MacOS/Google\ Chrome\ for\ Testing --version',
'/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add support for Chrome for Testing.app, available from version 113: https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone-with-downloads.json

Signed-off-by: Mior Muhammad Zaki <[email protected]>
'sink' => $resource,
]), array_filter([
'proxy' => $this->option('proxy'),
]))->get($url);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Laravel HTTP Client to speed up downloading ChromeDriver 115.

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
@@ -13,10 +13,11 @@
"php": "^8.0",
"ext-json": "*",
"ext-zip": "*",
"php-webdriver/webdriver": "^1.9.0",
"nesbot/carbon": "^2.0",
"guzzlehttp/guzzle": "^7.2",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows to use HTTP Client.

Copy link
Member

@driesvints driesvints left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mior!

@taylorotwell taylorotwell merged commit a926506 into laravel:7.x Jul 24, 2023
@crynobone crynobone deleted the chromedriver-changes branch July 24, 2023 15:24
Kayrah87 pushed a commit to Kayrah87/legacy-dusk that referenced this pull request Jul 28, 2023
* [7.x] Fix ChromeDriverCommand for ChromeDriver 115+

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Update OperatingSystemTest.php

* Update ChromeDriverCommand.php

* formatting

* formatting

---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
demondehellis pushed a commit to SwiftregUK/dusk that referenced this pull request Sep 8, 2023
* [7.x] Fix ChromeDriverCommand for ChromeDriver 115+

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Update OperatingSystemTest.php

* Update ChromeDriverCommand.php

* formatting

* formatting

---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
demondehellis pushed a commit to SwiftregUK/dusk that referenced this pull request Sep 8, 2023
---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
demondehellis pushed a commit to SwiftregUK/dusk that referenced this pull request Sep 8, 2023
---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downloading ChromeDriver 115+ fails
3 participants