Urgent.News

650+ sources. One page. See who else covered it.

Editions

Tech

Your Browser Automation Clicks Might Be Landing 25% Off — And Nothing Will Tell You

I spent a day pointing an AI agent at a browser to publish one product across four marketplaces. Most of it worked. The parts that didn't work failed in the worst possible way: silently , with no error, no exception, and no log line. Here are the five failure modes I hit, in the order I hit them, and the probe that turned the worst one from "this site is broken" into a two-line fix. Everything…

A morning spent automating a browser to publish a product across multiple marketplaces revealed several frustrating issues that went unnoticed. The primary problem was clicks that appeared to fail, with no error or console message to indicate the issue. The automation tool reported success, but in reality, nothing happened. The element was present on the page, visible and not disabled, yet the click had no effect.

To troubleshoot this, the reporter injected a button at a known position and monitored a counter when the button was clicked. A click at the measured center of the button didn't increment the counter, indicating that the click wasn't landing on the intended element. This led to the realization that the coordinate system used by the automation tool and the page were different.

The automation tool used screenshot space coordinates, while the page used CSS pixel space coordinates. The discrepancy in coordinate spaces was due to a scaling factor between the screenshot and the viewport. By comparing the two, the scaling factor was determined to be approximately 0.7484, allowing the clicks to be converted correctly.

Another issue encountered was a menu item below the fold that never responded to clicks. The element's bottom coordinate exceeded the viewport height, causing getBoundingClientRect() to return null. The solution was to ensure the element was visible in the viewport before attempting interaction, by scrolling the element into view before measuring its bounds.

Lastly, one site had a file input drop zone without a corresponding file input element in the DOM. This led to the browser failing to capture any input, resulting in the upload failing silently. The fix was to check for the existence of the file input before attempting to upload, ensuring that the operation only occurs when the necessary elements are present in the DOM.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Developers you build for the future...Don't forget to be inclusive!

Developers you build for the future...Don't forget to be inclusive! I build things for blind people. I'm a braille transcriber. I work in accessibility every day.

  • Chris, a braille transcriber, founded pifcoin.org to fund assistive technology.
  • Aurastoria.com created revenue and liquidity for these tokens.
  • Developers must prioritize accessibility as architecture, not a sprint feature.

Bloom Filters

One-liner: A probabilistic data structure that tells you if an element is definitely not in a set, or possibly in a set — using very little memory.

  • Bloom filters quickly tell if something is definitely not in a set or maybe it is.
  • They use a big array of bits and hash functions to add and check items.
  • Bloom filters save massive memory but can give false positives.

More from Sunday 16 August →