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

tips: Add Edge as Chrome #443

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions other/tips/selenium/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Selenium

This section exists to hold content related to the [Selenium](https://www.zaproxy.org/docs/desktop/addons/selenium/) add-on.
29 changes: 29 additions & 0 deletions other/tips/selenium/edge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Use Edge (chromium) instead of Chrome

Since Edge on Windows is now chromium based, you can choose to set your "Chrome" binary as "Edge" if you have a requirement for testing/exploring things with Edge (ex: in a corporate environment).

> [!CAUTION]
> While this tip might be handy for exploring an app manually it probably IS NOT a good move to set Edge as Chrome for the purposes of the Ajax Spider or DOM XSS rule.

## Setup Process

1. Get Edge's location. Hit the start menu and type "Edge".
2. Right click the start menu entry and hit "Open file location":

![](images/edge_file_location.png)

3. Get the properties for the Edge shortcut:

![](images/edge_shortcut_properties.png)

4. From the shortcut properties copy the "Target" value:

![](images/edge_properties.png)

5. Go back to ZAP and into the Selenium options:
6. Set the Chrome binary location to point to the Edge executable path you copied earlier.

![](images/selenium_options.png)

7. Then when you launch a 'Chrome' browser (either via the toolbar button or manual explore screen), it will launch Edge.
8. Note: You may get a message saying the "Provided browser was not found" when you close Edge :shrug: (just click "Ok" and ignore it.)
Copy link
Member

Choose a reason for hiding this comment

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

Did you try use with the official WebDriver for Edge?
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

Copy link
Member Author

Choose a reason for hiding this comment

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

And specifying that as the chrome driver? No I didn't.

I can/will 😃

Copy link
Member Author

@kingthorin kingthorin May 8, 2024

Choose a reason for hiding this comment

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

Unfortunately in that case (switching chromedriver for msedgedriver) it refuses to launch the browser at all 😞

Copy link
Member Author

Choose a reason for hiding this comment

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

Same if I rename the driver 😉

Copy link
Member

Choose a reason for hiding this comment

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

Ok, they do have their own EdgeDriver class which should address that. The error is not the best but... we could also look at adding support for that (even if we don't bundle the WebDriver).

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added other/tips/selenium/edge/images/launch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.