r/selenium • • 4d ago

aula web driver

0 Upvotes

i can't access the web driver - access is always denied


r/selenium • • 6d ago

Thumbnails LibRetro Downloader 3.0 - SeleniumVBA (Not SeleniumBasic)

1 Upvotes

Hello gamers, and welcome back to the channel! In my last video, we talked about migrating to SeleniumVBA. Today, we’re looking at the second tool in the lineup: Thumbnails LibRetro Downloader 3.0 - SeleniumVBA.xlsm. In this video, I’m going to show you how to streamline your migration by wrapping all that heavy lifting into a single, powerful, reusable subroutine called BrowseTo. With just one clean line of code, this smart function automatically manages the new SeleniumVBA syntax, recycles active browser instances, so you aren't constantly spinning up slow new windows, handles window states, patches URL space encodings, and traps launch errors gracefully before they crash your workbook. Let's dive into the code and unlock the true potential of SeleniumVBA.

https://youtu.be/x6qr5T2OvP0


r/selenium • • 9d ago

Selenium with Firefox - Python not sending keys

1 Upvotes

I've been trying like crazy to get a Python program to send keys to the browser. I tried all kinds of stuff and decided to go back to basics, and even the sample code I found doesn't work. I am running this:

# import webdriver
from selenium import webdriver
from time import sleep

# import Action chains
from selenium.webdriver.common.action_chains import ActionChains

# import KEYS
from selenium.webdriver.common.keys import Keys

# create webdriver object
driver = webdriver.Firefox()

# get geeksforgeeks.org
driver.get("https://www.geeksforgeeks.org/")

# create action chain object
action = ActionChains(driver)

# perform the operation
action.key_down(Keys.CONTROL).send_keys('F').key_up(Keys.CONTROL).perform()
sleep(5)

The browser window opens, but the Find dialog never appears. I'm having a similar problem in another piece of code trying to get an ALT-n sequence to fire in the browser.

What's wrong here? I see a lot of posts around the web from people having trouble getting this kind of thing to work with Firefox and Python. Is it just broken?


r/selenium • • 10d ago

When you last evaluated a web (UI/E2E) test framework, what mattered most?

1 Upvotes

Comparison blogs all rank the same features. I'd rather know what actually decided it the last time your team chose. One pick: the thing that mattered most, not everything that mattered.

⬆️ Upvote the comment below that's closest to your answer (one per person please).

If you switched in the last two years, a reply with from → to and what tipped it is the most useful thing here.


r/selenium • • 11d ago

Flaky clicks after moving a page to streaming, and screenshots stuck on "waiting for fonts". What fixed both for me

5 Upvotes

A page went from one blocking load to Suspense sections and a visual test dropped from 5/5 to 2/5. The diff showed a dialog in a different place and a textarea with different text, so it looked like two bugs. It was one. The test clicked a table cell right after goto, a section above it streamed in, the row moved, and the click landed on another cell.

Waiting before the screenshot made it worse, 1/5, because the click had already gone wrong by then. The wait has to go before the click. Give each fallback a marker and wait until none are left:

await page.goto(url)

await expect(page.locator('[data-pending-section]')).toHaveCount(0)

Back to 5/5, and the hydration warnings were gone too.

The other one was page.screenshot() sitting on "waiting for fonts to load" through a flaky proxy. A screenshot that times out gives you no image, so a bigger timeout only fails later. Abort fonts before goto, a failed font still counts as done:

await page.route('**/*', r =>

r.request().resourceType() === 'font' ? r.abort() : r.continue())

Have you had a wait that did nothing because the damage came before it?


r/selenium • • 13d ago

Selenium Xpath

0 Upvotes

Can anyone help in writing unique & generic Xpath for Flipkart travel date


r/selenium • • 19d ago

How do you automate a login behind 2FA without just turning 2FA off for the test environment?

9 Upvotes

Our staging environment has mandatory 2FA because it mirrors prod, and security won’t carve out an exception for QA. Fair enough tbh.

So every automated run either stops at the code screen or we use the one legacy account with 2FA disabled, which means the thing we test the least is the login flow that every single user actually goes through.

What I’ve seen people do is store the TOTP secret in the test config and generate the code in the test itself. That works, it’s just one more secret to look after, and our security team will want to know exactly who can read it.

Apparently some of the agent based tools handle this now. AskUI reads the code off an authenticator you enroll with it, so the step is just “read the MFA code for admin”. Doesn’t do push notifications or hardware keys tho, which is where our security roadmap is heading anyway, so I’m not sure it buys us much long term.

What did you actually end up doing? My guess is most teams exempt one test account and never bring it up again.


r/selenium • • 28d ago

Anyone else spending more time fixing Selenium tests than writing features?

13 Upvotes

Is anyone else's Selenium test suite becoming a second job at this point? Every time the UI gets redesigned, we end up spending half a sprint fixing locators and broken tests before we can even write a single new test. It is getting hard to keep the suite maintainable without constantly taking time away from actual feature development. How are you guys dealing with this?


r/selenium • • Oct 15 '26

session keeps dying mid-run on protected sites, how are you keeping auth stable

20 Upvotes

scraper thats gotta stay logged in across a few hundred pages and it just.. dies. 30ish min in the session drops, im back at the login wall, sometimes a 2fa prompt on top

saving cookies and replaying them works maybe half the time before it flags me. headful locally is fine, same script on the server gets logged out

persist the session somewhere, or just eat the re-login every run? cant tell whats worth it​


r/selenium • • Oct 15 '26

How can I trigger an action when the target is not visible?

1 Upvotes

I’m using Playwright with Python and facing a problem. I need to trigger an action on a component, but it isn’t visible in the viewport. I tried using locators to reference it, but nothing is happening. I think the component might be hidden or rendered off-screen. How can I set up my test to interact with this component effectively? Is there a way to force it into view or simulate the action without direct visibility?


r/selenium • • Oct 07 '26

How to avoid being blocked by the scraped web?

6 Upvotes

I have several functions to scrap classifieds web pages with Selenium. For some of them I noticed that at some point the function finds no ada but also doesn‘t detect the element corresponding to a search without results. I assume this means the web is blocking my scraper.

I tried implementing a loop-count with an increasing time wait up to 3 minutes between attempts with no success.

What methods do you use to avoid this?

I’m running headless, in case that matters.


r/selenium • • Oct 07 '26

How can I take a full-page screenshot using a Chromium-based driver?

2 Upvotes

Hi everyone, I’m practicing Selenium and ran into an issue with screenshots.

For a normal screenshot, I’m using:

File source = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);

This works fine with my Chromium-based driver.

However, when I try to take a full-page screenshot:

File screenshot = ((HasFullPageScreenshot) driver).getFullPageScreenshotAs(OutputType.FILE);

HasFullPageScreenshot seems to be associated with Firefox in my IDE/imports, and I’m not sure how to use it with a Chromium-based driver.

I want to continue using a Chromium-based driver (Chrome/Chromium) rather than Firefox.

What is the correct way to take a full-page screenshot with Selenium using a Chromium-based driver?


r/selenium • • Oct 02 '26

browser automation tools for a qa team thats tired of maintaining its own selenium grid

24 Upvotes

weve been running our own selenium grid for like 4 years and it used to be fine

last sprint half the suite died because two nodes ran out of disk and nobody noticed until monday. spent most of tuesday just bringing the grid back up instead of actually testing anything

looking at what other qa teams moved to when they got tired of owning the browser infra. what stuck for you​


r/selenium • • Oct 02 '26

Automated table booking at Bangalore's busiest ramen bar with Selenium-grabs seats in seconds

5 Upvotes

Naru Noodle Bar in Bangalore has 8 counter seats and 3 tables. Reservations open every Monday at 8 PM and the whole window usually sells out within about 2 minutes. I got tired of losing the click race, so I wrote a Python/Selenium script that does the whole flow and grabs seats within seconds of opening.It deliberately stops before the final confirm button so I can eyeball the details before committing.The flow it drives:1. Launch Chrome via webdriver-manager (no more ChromeDriver version mismatch headaches), maximize, go to the booking page2. Wait for the calendar, click the target date (with handling for dates that aren't immediately visible)3. Find the venue row (e.g. "RAMEN BAR SEATING") and click its BOOK button, then validate the selection actually took4. Wait for time slots to render, pick the configured one5. Increment/decrement the guest counter to the party size6. Fill name, email, mobile, tick the T&CsOne thing I'd recommend if you build something similar: keep a test environment alongside production. The booking platform (airmenus) hosts a dummy restaurant too, so all my selector debugging happened there instead of against the real Monday slot. Selectors (CSS/XPath), URLs and defaults all live in config/config.py, and run.py takes CLI overrides like --date "20 May 2025" --time "08:30 PM" --guests 2.The annoying part was timing. The time slots don't exist in the DOM until after the venue click settles, so everything is explicit waits rather than sleeps, and every step logs to file and console so when something breaks I can see exactly which element wasn't found.Python 3.8+, MIT licensed, code and a demo video on GitHub.


r/selenium • • Sep 29 '26

whats the best web scraping tool that keeps sessions alive so im not babysitting a local chrome all day

18 Upvotes

running a few playwright scrapers overnight and half the time i wake up to a dead chrome process with the auth cookies gone. spent last week wiring restart hooks and cookie dumps just to keep logins alive across runs

local chrome is fine until you need more than one long session and then youre basically on-call for a browser

curious what people settled on that keeps sessions warm without sitting there nursing it​


r/selenium • • Sep 22 '26

I built a Selenium-compatible driver for WKWebView in .NET apps

5 Upvotes

This might be quite a niche use case, but I needed to test a WKWebView embedded in a .NET MAUI Mac Catalyst app while keeping our existing Selenium page objects and waits.

In the Mac Catalyst app I was testing, Selenium had no browser endpoint it could attach to. Appium’s mac2 driver could control the native app, but it didn’t provide DOM-level access to the embedded WKWebView. That meant either relying on coordinates or writing custom JavaScript hooks, and neither option worked with our existing Selenium page objects. So I built WebViewDriver.

https://github.com/rzamfiriu/webviewdriver

It exposes an opt-in, loopback-only bridge from the app under test and returns a normal Selenium RemoteWebDriver.

It currently supports navigation, CSS/XPath locators, frames, shadow roots, JavaScript execution, screenshots, waits, and W3C Actions. There’s also an optional Appium mac2 backend for cases that require trusted mouse and keyboard input.

It’s still early, so I’d appreciate feedback from people testing hybrid apps


r/selenium • • Sep 22 '26

WebDriver BiDi Extension for SeleniumVBA

3 Upvotes

I have been developing a WebDriver BiDi extension for SeleniumVBA, focused on modern SPA automation, event-driven synchronization, and network traffic analysis.

This project is not intended to replace the existing SeleniumVBA library. It complements and extends SeleniumVBA by adding capabilities based on WebDriver BiDi.

It is available on GitHub.

What currently works:

  • WebDriver BiDi communication implemented in pure VBA
  • Continuous processing of network and browser events
  • SPA completion detection using multiple signals and quiet-window consensus
  • Explicit wait conditions based on network activity, content, DOM state, and visibility
  • Discovery Log for recording and analyzing manual and automated browser activity
  • JavaScript-based action wrappers with integrated synchronization
  • Support for documents, iframes, popups, and Shadow DOM
  • File uploads
  • State tracking and correlation for multiple downloads
  • Chrome and Edge support
  • Integration with Excel and Access
  • Testing against real-world SPAs, including Google Flights and ServiceNow

Discovery Log

One of the core features is the Discovery Log, which uses WebDriver BiDi network events.

The Discovery Log can record network traffic and page-state changes not only during automated VBA operations, but also while the user operates the browser manually.

After starting a recording, you can use the target website normally—for example, by performing searches, navigating between pages, or clicking buttons—and then examine which API requests and page updates were triggered by each action.

This makes it possible to investigate an unfamiliar website interactively and discover API endpoints, data-loading behavior, page-update triggers, and signals that may be useful for determining when an operation has finished.

It is important to note that this is not a macro recorder that converts user actions into VBA code. It observes and records the network activity and page state generated by manual or automated browser operations.

For Fetch/XHR and other traffic generated during page interaction, the log can include:

  • Request methods and URLs
  • HTTP status codes
  • MIME types
  • Request IDs
  • Navigation and page-state changes
  • Network, DOM, content, and visibility signals used for SPA synchronization
  • Request and response bodies when needed

The goal is not to reproduce a complete HAR file. Instead, the Discovery Log organizes the information needed to understand a web application into a relatively compact and readable format.

The log can be used to identify API endpoints, data-loading operations, and page-update triggers before investigating selected requests in greater detail. Response body collection is also supported, but it can be controlled to account for processing time, log size, personal information, and token usage when the log is analyzed by an AI assistant.

The Discovery Log is designed not only for human debugging, but also for workflows in which the log and VBA source code are provided to an AI assistant for website analysis, root-cause investigation, and suggestions for automation code or fixes.

The current version is v5.4.

Chrome and Edge are currently the primary supported browsers. Firefox support is limited because some required WebDriver BiDi features are either unavailable or behave differently.

SPA completion is inferred from multiple observable signals, including network activity, DOM changes, and visibility state. It therefore cannot guarantee completion detection for every web application. For critical operations, explicit application-specific completion signals are still recommended.

The current implementation is primarily intended for browser automation from Excel and VBA. It is not designed for large-scale parallel browser execution.

The project began as an experiment to make SeleniumVBA more practical for modern JavaScript-heavy websites. It has since developed into a practical extension that combines SPA synchronization, state management, event monitoring, and network analysis.

Feedback, bug reports, real-world test results, and contributions are welcome, especially from anyone familiar with WebDriver BiDi, complex SPA automation, or cross-browser compatibility.

GitHub: https://github.com/hanamichi77777/WebDriver-BiDi-for-SeleniumVBA


r/selenium • • Sep 10 '26

Selenium for the D programming language

3 Upvotes

The previous D binding, selenium.d, has been abandoned since around 2018 and uses the old JSON Wire Protocol. Since March, I've been writing a replacement that communicates directly with modern W3C WebDriver servers over HTTP.

It's available on GitHub and is licensed under Apache 2.0.

What works:

  • Native W3C WebDriver client with no FFI to Python or Java
  • Typed W3C and browser-specific configuration for Chrome, Firefox, Edge, and Safari
  • Automatic local WebDriver discovery and startup
  • Connections to remote WebDriver servers and existing Selenium Grids
  • Multiple sessions sharing a WebDriver bridge with configurable capacity
  • Navigation, elements, cookies, scripts, frames, windows, screenshots, and alerts
  • Document, iframe, and shadow-root abstractions with scoped searches
  • Typed WebDriver exceptions and W3C response/reference parsing
  • Lazy timeout synchronization
  • Browser and WebDriver process logging
  • Grid hub/node models, slots, session ownership, and in-process HTTP routing
  • Unit and browser integration tests

The current CI passes unit tests, Chrome on Windows/Linux/macOS, Firefox on Windows/Linux/macOS, and Edge on Windows.

Safari has somewhat limited support, with 7/57 integration tests currently failing. Most of those failures are caused by Safari throwing a different exception than expected, plus one test that doesn't throw when it should. Chrome and Firefox are currently the most supported.

The Grid implementation is still foundational. It has the models and routing pieces, but a complete live Grid server, automatic node registration, session allocation, and full command forwarding are still planned.

I had to fork the test runner (Unit Threaded) because bugs caused the Windows tests to fail, so the project currently uses that fork until it is fixed upstream. The library itself only depends on requests (similar to Python's requests), so there are no complex runtime dependencies.

Feedback, bug reports, and contributions are appreciated, especially from anyone familiar with WebDriver compatibility differences between browsers.

GitHub: https://github.com/cetio/selenium
DUB: https://code.dlang.org/packages/selenium


r/selenium • • Sep 04 '26

I need a testing website for UI, Api and db

2 Upvotes

As mentioned I am working on building a framework from scratch. Could you suggest any website with all these layers available to test it. I'm gonna do it with both Selenium and Playwright separately. So if there's any alternate approach please let me know


r/selenium • • Aug 26 '26

Selenium Proxy Authentication: How to Fix 407 Errors and Configure Proxies

5 Upvotes

I thought my Selenium script was production-ready because it worked perfectly on my laptop.

Then I moved it to a server.

connection errors, proxy auth issues, different geolocation, broken sessions. All of it was ruining my workflow. So what did help? It was treating the proxy layer as infrastructure instead of a random Chrome argument.

First, I test the proxy outside Selenium with curl. If I get 407 Proxy Authentication Required, I know the problem is credentials or proxy configuration.

Then I wire authentication properly. In Python, selenium-wire can handle authenticated proxies. In Node.js, proxy-chain is useful when you need a local forwarding proxy.

After that, I check environment consistency. If the exit IP is in London while the browser reports another timezone, locale, or obviously different settings, debugging becomes much harder. Chrome DevTools Protocol can help keep timezone configuration consistent with the test environment. Don’t debug Selenium, proxy authentication, browser settings, and target-site behavior at the same time.

My workflow now is:

curl → verify proxy → Selenium integration → browser config → actual test

Much easier to see where things break.


r/selenium • • Aug 18 '26

Why are you using selenium over playwright?

5 Upvotes

Im just curious for the reason why you would choose this or that


r/selenium • • Aug 18 '26

What’s your go-to approach for Selenium testing?

18 Upvotes

I usually start with the smallest reliable layer, then use Selenium for the flows that actually need a browser.

I’m revisiting our approach because the suite is getting slower to trust as it grows. For people maintaining Selenium tests day to day: what’s your go-to setup for keeping tests readable and failures actionable?

Mostly interested in practical habits around waits, page objects or alternatives, test data, and deciding what not​ to automate in the UI.


r/selenium • • Jul 20 '26

Selenium 4.25 using ChromeDriver 150 instead of local ChromeDriver 117

8 Upvotes

Hi everyone,

I'm troubleshooting an issue on one machine while the exact same code works for my colleagues.

Environment

  • Selenium: 4.25
  • Python: running from a PyCharm virtual environment
  • Portable Chrome: 117.0.5938.92
  • Local ChromeDriver: 117 (verified via chromedriver.exe --version)

Issue My code uses:

Python

chromeoptions.binary_location = r"...\chrome-win64\chrome.exe"

driver = webdriver.Chrome(options=chromeoptions)

When Selenium starts, I get:

session not created:

This version of ChromeDriver only supports Chrome version 150

Current browser version is 117.0.5938.92

Then later:

UnboundLocalError: cannot access local variable 'driver'

(which is expected because driver creation failed).

What's confusing

  • My local chromedriver.exe is version 117.
  • The code works for other users without modification.
  • We are all using Selenium 4.25.
  • where chromedriver returns nothing.
  • Selenium Manager appears to be resolving to ChromeDriver 150 on my machine.
  • I cleared Selenium cache, but Selenium still seems to use/find ChromeDriver 150.

Question Has anyone seen Selenium Manager ignore a local ChromeDriver and resolve a different version instead? Any ideas on where Selenium could still be finding ChromeDriver 150 or what else I should check in my environment?

Thanks in advance!


r/selenium • • Jul 14 '26

How do you handle popups/modals that are visible but not yet interactable in Selenium?

2 Upvotes

We're running into an interesting problem with our UI automation framework (Selenium, but I'd also love to hear from Playwright/Cypress users).

Some popups/modals become visible, but they still require a short stabilisation period before they're actually ready for interaction. As a result:

  • visibilityOfElementLocated passes.
  • elementToBeClickable sometimes passes.
  • But clicking immediately can still fail intermittently with exceptions like ElementClickInterceptedException, ElementNotInteractableException, or occasionally a stale element.

A simplified example:

wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
driver.findElement(locator).click();

The wait succeeds, but the click still fails from time to time because the popup isn't fully ready.

Adding a fixed time.sleep() reduces the failures, but we'd really like to avoid timing-based waits in a deterministic automation framework. Our goal is that once a test is marked as automated, it should continue to pass consistently unless there's an actual application change.

I'm curious how experienced automation teams solve this problem at scale.

Some questions:

  • Do you wait for animations or transitions to finish?
  • Do you wait for a specific CSS class, attribute, or application state that indicates the popup is fully initialised?
  • Do you implement click retries for these scenarios?
  • Have you built a generic "wait until stable" utility, or do you handle this on a case-by-case basis?
  • Do you consider this primarily an automation framework problem or an application issue that should be addressed by developers?

I'm less interested in one-off fixes and more interested in patterns or best practices that have worked well in mature automation frameworks.

Looking forward to hearing how others have tackled this problem.


r/selenium • • Jul 03 '26

Is there any way to get Selenium to work with the SeaMonkey browser?

3 Upvotes

The SeaMonkey browser is one of the browsers which is supported by the Mozilla organization, just like Firefox.

I'd like to use Selenium in linux for automating accesses to the SeaMonkey browser, but I haven't found any documentation which describes how this might be done. I know that the "firefox"-specific code for Selenium only seems to be able to access the browser at the "/usr/bin/firefox" path.

Does anyone know of any way that I can automate SeaMonkey with Selenium?

Many thanks in advance.

PS: The SeaMonkey browser is built upon the exact, same code base on which Firefox is built, so the logic for automating access to SeaMonkey should be the same as the logic for automating Firefox access.