Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Microsoft Edge supports browser automation at several levels. For a repeatable browser workflow without writing code, use the DevTools Recorder. For maintainable tests and scripts, use Playwright or Selenium WebDriver. For quick one-off page actions, use JavaScript in the DevTools Console.
The right choice depends on what you need: Recorder is useful for capturing and replaying interactions, Playwright is generally the smoother choice for modern automated tests, and Selenium remains a practical option when you already use WebDriver-based tooling.
Choose an Edge automation method
| Method | Best for | What it produces | Main limitation |
|---|---|---|---|
| DevTools Recorder | Capturing a workflow and replaying it manually | A saved flow, JSON, or Puppeteer-based JavaScript | It is not a complete test framework |
| DevTools Console and Sources | Small, one-off page manipulations | JavaScript run in the current page | Not persistent unless saved as a snippet or external script |
| Playwright | Modern end-to-end tests and browser automation | JavaScript or TypeScript test files | Requires a Node.js project and browser setup |
| Selenium WebDriver | Existing WebDriver projects and cross-browser infrastructure | Python, JavaScript, C#, Java, or another binding’s code | Requires Selenium 4 and a compatible Edge WebDriver |
Option 1: Record a workflow in Edge DevTools
Recorder can capture actions such as navigation, clicks, typing, and other interactions, then replay the resulting flow. It is a useful starting point when you want to understand selectors or generate a first draft of an automation script.
Open Recorder
- Open a webpage in Microsoft Edge.
- Right-click the page and select Inspect, or press Ctrl+Shift+I on Windows/Linux or Command+Option+I on macOS.
- Select Recorder on the DevTools Activity Bar. If it is not visible, select More tools > Recorder.
Create and replay a recording
- Select Create a new recording.
- Enter a value under Recording name.
- Select Start recording.
- Perform the workflow in the page, such as opening a menu, entering search text, and submitting a form.
- Select End recording when finished.
- From the recordings list, select Play recording. You can also open the flow and select Replay.
Replay runs as fast as possible by default. To watch each interaction, use the dropdown beside Replay and choose Slow, Very slow, or Extremely slow.
#1 Best Overall
Edit selectors and steps
Expand a step using its triangle control to inspect or change its details. Recorder saves the step type, DOM selectors, and properties automatically. The Open step actions menu lets you add a step before or after the selected step, or add a breakpoint.
Recorder can use XPath selectors with the xpath/ prefix. For example: xpath//html/body/form/div/label. In a real project, prefer stable attributes such as data-testid when the application provides them. Long paths based on the page’s exact HTML structure can break when a developer adds or moves an element.
Pause a replay for debugging
- Open Open step actions for the step where execution should stop.
- Select Add breakpoint.
- Replay the flow.
- When it pauses, select Continue to resume normally or Execute one step to advance one action at a time.
Export the recording
Select Export and choose JSON to save the flow. The file uses the flow name and the .json extension. To use it later, select Import recording, choose the JSON file, and select Open.
Recorder can also export JavaScript through Export. The available formats are @puppeteer/replay, Puppeteer, and Puppeteer (including Lighthouse analysis). These exports use the .js extension. The current Edge Recorder documentation does not list Playwright as an export format, so do not expect Recorder to generate a Playwright test directly.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsRecord performance while replaying
While replaying a flow, select Performance panel in the top-right of Recorder. Edge opens the Performance tool and records performance during the replay. This can show whether a slow step is caused by scripting, layout, rendering, network activity, or another part of the page.
Option 2: Run a quick JavaScript automation script in DevTools
For a one-time operation, the Console is often faster than creating a full project. Open it with Ctrl+Shift+J on Windows/Linux or Command+Option+J on macOS. The code runs in the context of the current page.
Rank #2
For example, this changes every paragraph on the current page: document.querySelectorAll(‘p’).forEach((paragraph) => { paragraph.style.backgroundColor = ‘yellow’; });
You can save a longer script in DevTools by opening the Sources tool and creating a snippet. Sources is Edge’s code editor and JavaScript debugger, and it supports snippets, projects, and debugging.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Console helpers are convenient but have an important boundary. Functions such as $(), $$(), $0 through $4, and $_ work only when entered directly in the DevTools Console. They are not available to page scripts or external automation programs. In an external script, use standard JavaScript APIs such as document.querySelector() and document.querySelectorAll().
To find other DevTools commands, open the Command Menu with Ctrl+Shift+P on Windows/Linux or Command+Shift+P on macOS. You can also select Customize and control DevTools > Run command. The menu starts with a > prompt. Remove it and enter ? to see categories such as Open File, Run Command, Go to Symbol, Go to Line, and Run Snippet.
Option 3: Automate Microsoft Edge with Playwright
Playwright is a good fit for repeatable tests, login flows, screenshots, form submissions, and CI pipelines. Install it in a Node.js project with npm i -D @playwright/test, then install Playwright-managed browser binaries with npx playwright install. The latter does not automatically mean the script runs the Microsoft Edge executable. By default, Playwright uses its Chromium browser. To target installed Microsoft Edge, specify the msedge channel.
Create a basic Edge test
Create tests/edge-example.spec.ts with this test: import { test, expect } from ‘@playwright/test’; test(‘checks a page in Microsoft Edge’, async ({ page }) => { await page.goto(‘https://playwright.dev/’); const title = page.locator(‘.navbar__inner .navbar__title’); await expect(title).toHaveText(‘Playwright’); }); Run it with npx playwright test. Playwright Test runs headless by default. To see Edge while the test runs, use npx playwright test –headed.
Rank #3
Configure Playwright to use Edge
Add an Edge project to playwright.config.ts with the name Microsoft Edge and use: { channel: ‘msedge’ }. The documented channel names are msedge, msedge-beta, msedge-dev, and msedge-canary. If the required Edge channel is not installed, use npx playwright install msedge.
For the library API rather than Playwright Test, launch Edge through Chromium with the channel option: const playwright = require(‘playwright’); (async () => { const browser = await playwright.chromium.launch({ channel: ‘msedge’ }); const context = await browser.newContext(); const page = await context.newPage(); await page.goto(‘https://www.microsoft.com/edge’); await page.screenshot({ path: ‘example.png’ }); await browser.close(); })();
The distinction matters: npx playwright install installs Playwright’s browser binaries, while channel: ‘msedge’ selects Microsoft Edge. If no window appears, remember that headless mode is the default.
Option 4: Automate Edge with Selenium WebDriver
Selenium uses a separate WebDriver process to control Edge. Installing the Selenium package alone is not the same as installing msedgedriver.
Install and match the driver
- Open edge://settings/help and note the installed Edge version.
- Open the Microsoft Edge WebDriver download page.
- Download a driver whose first three version components match Edge. For example, Edge 128.0.2739.79 is compatible with WebDriver 128.0.2739.84.
- Extract msedgedriver.
- Add the directory containing the executable to PATH, or provide its location through your language binding.
The fourth version component does not need to match. Matching only the major version is not enough. Selenium 4 is required; Selenium 3 is no longer supported for Microsoft Edge automation.
Python example
Install Selenium with pip install selenium. Then create a script such as edge_search.py: from selenium import webdriver; from selenium.webdriver.common.by import By; import time; driver = webdriver.Edge(); try: driver.get(‘https://bing.com’); element = driver.find_element(By.ID, ‘sb_form_q’); element.send_keys(‘WebDriver’); element.submit(); time.sleep(5); finally: driver.quit().
Rank #4
The Edge-specific startup call is webdriver.Edge(). A WebDriver session stays open until it is closed, so put driver.quit() in a cleanup block even when the script fails.
JavaScript example
Use Selenium’s JavaScript binding: const { Builder, By } = require(‘selenium-webdriver’); (async () => { const driver = await new Builder().forBrowser(‘MicrosoftEdge’).build(); try { await driver.get(‘https://bing.com’); const element = await driver.findElement(By.id(‘sb_form_q’)); await element.sendKeys(‘WebDriver’); await element.submit(); await driver.sleep(5000); } finally { await driver.quit(); } })();
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Run Edge headless with Selenium
Use the exact argument –headless=new. In Python: from selenium import webdriver; from selenium.webdriver.edge.options import Options; options = Options(); options.add_argument(‘–headless=new’); driver = webdriver.Edge(options=options).
Use an Edge preview channel
Set the browser executable through Edge options. The documented Windows path for Edge Beta is C:\Program Files (x86)\Microsoft\Edge Beta\Application\msedge.exe.
In Python, set options.binary_location to r’C:\Program Files (x86)\Microsoft\Edge Beta\Application\msedge.exe’ before calling webdriver.Edge(options=options).
Enable verbose WebDriver logging
If startup fails or a command behaves unexpectedly, enable verbose logging. In Python: from selenium import webdriver; from selenium.webdriver.edge.service import Service; service = Service(service_args=[‘–verbose’]); driver = webdriver.Edge(service=service).
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
Common Edge automation failures
| Symptom | Likely cause | Fix |
|---|---|---|
| Recorder is missing | The tool is not visible on the Activity Bar | Use More tools > Recorder. |
| Recorder replay is too fast | Fast replay is the default | Choose Slow, Very slow, or Extremely slow, or add a breakpoint. |
| Playwright opens no browser window | Playwright Test is running headless | Run npx playwright test –headed. |
| Playwright runs Chromium instead of Edge | No Edge channel was specified | Set channel: ‘msedge’, or install it with npx playwright install msedge. |
| WebDriver cannot start | The first three Edge and driver version components do not match | Download the matching Microsoft Edge WebDriver version. |
| msedgedriver is not found | Its directory is not on PATH | Add the containing directory to PATH or configure an explicit driver path. |
| Selenium code fails with an old API or driver | Selenium 3 is being used | Upgrade to Selenium 4. |
| Automation cannot control an untrusted Application Guard site | The container does not expose the remote debugging port required by WebDriver | Trusted Application Guard sites can be automated; untrusted sites cannot be automated or manipulated through Edge WebDriver. |
Which approach should you use?
- Use Recorder when you want to capture a browser workflow, inspect selectors, or replay it interactively.
- Use a DevTools snippet when the task is a short, temporary action on the page currently open.
- Use Playwright for new end-to-end tests, screenshots, modern asynchronous web applications, and projects that need strong test tooling.
- Use Selenium when your organization already has WebDriver infrastructure or shared Selenium test suites.
Whichever tool you choose, replace fragile selectors with stable ones, wait for meaningful page states rather than arbitrary delays where possible, and always close browser sessions in cleanup code.
FAQ
Can Edge DevTools Recorder export a Playwright script?
No. The documented JavaScript export formats are @puppeteer/replay, Puppeteer, and Puppeteer including Lighthouse analysis. Recorder can also export and import its flow as JSON, but Playwright is not listed as a direct export format.
Does Playwright automatically use Microsoft Edge?
No. Playwright normally uses its managed Chromium browser. Set channel: ‘msedge’ to target an installed Microsoft Edge channel, or run npx playwright install msedge when Edge needs to be installed through Playwright.
Do Edge and Edge WebDriver need exactly the same version?
No. Their first three version components must match. The fourth component can differ. For example, Edge 128.0.2739.79 and WebDriver 128.0.2739.84 are compatible.
Recommended Free Tools
Why does my Selenium Edge script leave browser windows open?
The WebDriver session remains active until it is closed. Put driver.quit() in a finally block so it runs after both successful and failed actions.
Can I use DevTools Console helpers such as $0 in an external automation script?
No. Edge documents helpers such as $(), $$(), $0 through $4, and $_ as Console-only utilities. External scripts should use standard DOM APIs or the locator APIs provided by Playwright or Selenium.
The Bottom Line
For a no-code starting point, record the workflow in Edge DevTools and export its JSON or Puppeteer-based JavaScript. For a durable automated test, use Playwright with channel: ‘msedge’ or Selenium 4 with a WebDriver whose first three version components match Edge. Use DevTools snippets only for small, immediate tasks, and remember that Console shortcuts do not carry over into external scripts.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

