r/ProgrammerHumor • • Oct 20 '26

Meme theExactErrorIsDifferentBitYouGetIt

Post image
3.0k Upvotes

66 comments sorted by

371

u/purbub Oct 20 '26

Relatable. UI testing was really frustrating back then

175

u/rabbit_wizard Oct 20 '26

As a developer I didn't expect UI tests to be so unpredictable. It's so frustrating when you see the button & it's clickable, but your "automated" test refuses to accept it

118

u/laplongejr Oct 20 '26 edited Oct 20 '26

At least with Selenium, a stupid workaround was to identify the button, then pass it's (internal) Object to javascript's executor and run the .click() directly in browser rather than Selenium-side.
Which technically doesn't match user behavior but hey, sometimes you need to test what's beyond that click...

33

u/rabbit_wizard Oct 20 '26

I hope this helps some poor programmer someday in the future :)

18

u/CaptainCabernet Oct 20 '26

I remember we had like 20 checks in our Selenium Button.click(). We checked visibility, clickable, not disabled, centered it on the screen (to avoid floating UI), checked if it was in a loading state, and then... finally... Clicked.

6

u/ralgrado Oct 20 '26

Are you using plain Selenium? If so I would recommend a framework (e.g. selenide) that's based on Selenium but handles these issues.

3

u/PM_ME_YOUR_BUG5 Oct 20 '26

I often found it was because the element had moved.

If you rebuild the object each time you need to interact with it it's much more reliable

6

u/Named_after_color Oct 20 '26

As a developer, I can't read that opening without having ptsd flashbacks to user story definitions.

3

u/Perfect-System2504 Oct 20 '26

js context issue? i know nothing about playwrite

1

u/Rojeitor Oct 20 '26

It has always been like this and always will. These tests are expensive and you must treat those like that. You're testing "everything". You write just the ones that are really important. Everything else RTL tests or similar.

37

u/1AMA-CAT-AMA Oct 20 '26

The fucking tests would always take way more time than the implementation.

26

u/purbub Oct 20 '26

Reminds me of a good ol quote:

Is it really us who test the code
Or is it the code who tests us?

1

u/awesome-alpaca-ace Oct 25 '26

They always do

31

u/AwesomeFrisbee Oct 20 '26

Back then? It still has its annoyances to this day. But now we just let AI figure it out and make tests that are almost worthless.

1

u/ItsOmniss Oct 20 '26

yeah, "testing"

115

u/SuitableDragonfly Oct 20 '26

If, when stuff like this happens, you spend some time talking to your cat about why you think it should be working instead of making a meme, you'll actually figure out what's wrong. 

32

u/rabbit_wizard Oct 20 '26

This was back when I was a newbie to playwright and sometimes it's because of angular themes . Testcomplete was way more flaky.

13

u/rabbit_wizard Oct 20 '26

It is frustrating though

3

u/NomaTyx Oct 20 '26

let the man make his meme dude

5

u/requizm Oct 20 '26

OP doing this for karma. I would say it is bot but the comments seem convincing. Anyway:

  • 5 posts in 2022-2026 (other subreddits)
  • 15 r/ProgrammerHumor posts in the last 6 days. 5 of them removed, probably due to low upvotes

21

u/rabbit_wizard Oct 20 '26

OP came back to reddit, and OP likes making memes :) . Some were removed because 2/ day post limit and some yes, I thought they were in bad taste. OP isn't a bot :)

2

u/sebjapon Oct 20 '26

Exactly what a bot would say! /s

1

u/rabbit_wizard Oct 20 '26

Yeah good one! I passed a captcha test mind you (kidding)

2

u/ralgrado Oct 20 '26

That proofs you are a bot! No human can solve modern Captchas anymore!

2

u/rosuav Oct 21 '26

Turing test.... bots can pass it. CAPTCHA... bots can do them. The Kamski test.... humans fail it.

We're doomed.

3

u/rabbit_wizard Oct 20 '26

I'm curious though, what did you use to track this? Seems useful

7

u/returnFutureVoid Oct 20 '26

Cat.listener(): ObjectNotFound.

2

u/zyxzevn Oct 20 '26

Destroyed by Cat

9

u/-Ambriae- Oct 20 '26

Cats are good listeners, but dogs are the way to go imo

17

u/DaTruSpork Oct 20 '26

Whatever happened to the love for the rubber ducky?

13

u/-Ambriae- Oct 20 '26

That was the old meta

It’s no longer considered best practice

2

u/s0ulbrother Oct 20 '26

We work from home more now we don’t get ducks

7

u/Apprehensive_Gas56 Oct 20 '26

Instructions unclear I spent the last 3 hours playing with my dog now

1

u/-Ambriae- Oct 20 '26

Then the instructions were very much clear!

1

u/rosuav Oct 21 '26

You just spent three hours NOT struggling with a stupid piece of electrified sand that thinks it's smarter than you. This is a win.

2

u/EishLekker Oct 20 '26

Why should your cat be working, and what memes was it making?

2

u/xWrongHeaven Oct 20 '26

Good ol' rubber duck debugging

1

u/EkoChamberKryptonite Oct 21 '26

Or...and hear me out - Let the dude make a meme about something he found funny. Are you sure you're on the right sub? My goodness, y'all turn every meme post to a tech discussion. There are subs for that.

1

u/s0ulbrother Oct 20 '26

what ends up being wrong is your test was looking at the wrong page and you were caching results which made it think it was working.

Honestly setting up FE e2e is harder than front end dev

16

u/Ange1ofD4rkness Oct 20 '26 • Bravo

My eye is twitching just thinking about that debugging session

19

u/LordAmir5 Oct 20 '26

I have no idea what a Playwright is. But click being a method of a Locator seems like bad design. Shouldn't a locator have a locate method instead?

16

u/rabbit_wizard Oct 20 '26

I've not used the exact syntax. Playwright is definitely much better than my previous application - Testcomplete. That gave me enough PTSD to last a lifetime

7

u/raskim7 Oct 20 '26

Allow me to introduce you to Tricentis Tosca. Legends tells that they tried to sell it as torture method, but even the folks at Guantanamo Bay refused, as it would have been too inhuman to make prisoners use that. So, they found the only company that doesn’t mind such things as humanity or sanity, and partnered with them. And thats how you get Testautomation for SAP.

2

u/ralgrado Oct 20 '26

I'm going to send this to one of my colleagues who is working a lot with Tosca (for other companies)

3

u/Odd_Percentage6799 Oct 20 '26

Locator is the interface. 

It is returned by the methods on the main Page class that fund elements on the DOM  

It can make for some very readable tests. 

53

u/midtownmoron Oct 20 '26 • Mindblown

Had a ghost hunt with Selenium for the same reason.

Element is visible. Element is scrolled to, but can you click it? Nah, click intercepted by a sticky header. No javascript I tried stuffing in there could scroll the damn button into focus either. Nevermind the exact width of the header as a point of orientation as to where I need the button to be.

The solution will shock you I had navigated to a fake-anchor (actually just a query) previously and that had changed the scrolling behaviour of the website for Selenium. Navigate to the base URL and suddenly everything works. I will nail this board to my forehead myself thank you

6

u/Informal_Branch1065 Oct 20 '26

[RetryFact(5)] my beloved

158

u/laplongejr Oct 20 '26 edited Oct 20 '26

I think it's a long time since I laughed that much to an "overused" meme format. That "is clickable" looks to be filler to match the format, but I just KNOW that it actually HAS to be there in real situations. I can hear and feel the annoyance in that line of "you won't loophole me this ti- oh dammit." , and it matches ManRay's smile* so much as a bonus.

(I don't know Playwright but I have PTSD from Selenium. WHAT DO YOU MEAN there's an invisible object in front of the button's pixel position??? My mouse can highlight and click it just fine, click it!)

[EDIT] *I learned today that in the US the character is called Man Ray to match Bernacle Boy and Mermaid Man. In French the two heroes are direct translations, but the supervillain is called "Dark Glasses"... I mean his mask is the shape of a manta ray, so why didn't they- ooooh. NSFW tangent a ray/raie is slang for a butt's crack

52

u/thoughts_n_calcs Oct 20 '26

Unterstand, Selenium was a pure nightmare. Playwright is better, but still there is a reason why memes like this one exist.

16

u/ironimus42 Oct 20 '26 edited Oct 20 '26

i had this problem with playwright when the button was in a menu in a drawer. So it had a combo of all things that scare playwright: css transforms & transitions (which turn on gpu acceleration and make it especially confused), fixed positioning, menu mounting in an awkward way, having to scroll within the drawer. I thought i managed to make it all work by setting specific timeouts and pixel values, everything passed locally without issues every time, but then it was failing 20% of the time when running in ci

i quietly removed that test after this piece of ui became stable and everyone who noticed thanked me

if you were going to ask, claude failed to accomplish even the flaky-but-working version of the test, it looked like claude was going to have a mental breakdown outputting text in all caps and such, so i did it by hand to avoid stressing out the poor model

3

u/GroovinChip Oct 20 '26

I’ve had similar struggles with Maestro, I feel your pain lol

14

u/korneev123123 Oct 20 '26

It's not an "OK" button, it is "info" button with "OK" text in it. Completelt different thing.

5

u/Highborn_Hellest Oct 20 '26

Step1: have this issue
Step2: call the software engineer who made this on steam, to please add an ID to the object.
Step3: locate by id.

5

u/therealdan0 Oct 20 '26

I see all the folks here claiming selenium was the devil incarnate and just know they never had to experience Winium. Imagine for a moment the pure horror of selenium but the DOM contains not only the webpage, but the entire browser and every other open application and the windows desktop. I once had to test an application using winium that opened to a splash screen while the data loaded (for between 3 and 10 minutes) then threw a login window before opening the actual window. Each window had the same app name, pid and window name. So what? The windows replaced each other I hear you say. Nope each window stayed in the dom, just hidden. Could I grab the window by calling window[i]? Yep. Was the index reliable? Was it fuck. I had to identify and grab each window by finding a known element on it. The login window had an named field I could hook into and the window had a toolbar.

4

u/an_agreeing_dothraki Oct 20 '26

alert(responseToJSJoke);

"object Object"

3

u/Altruistic-Tax-5291 Oct 20 '26

Send like not a lot of people remember the times before Playwright 😄 I think that's the second good tool MS invent after TypeScript

1

u/afellowpadawan Oct 20 '26

This is me with blazer interactivity models (I never know where shit renders lol)

1

u/chatrep Oct 20 '26

But what about hover and mobile?

1

u/Important_Grab3544 Oct 21 '26

Internet Explorer-like meme.

1

u/SchokoladeMitRavioli Oct 20 '26

Removing all my ui tests cured my depression.

0

u/Smalltalker-80 Oct 20 '26 edited Oct 23 '26

I just code GUI tests in the same language as the project.
So TestMyApp *sees* the MyApp instance, and can directly access the OK button.
Writing tests and debugging them is *so* much nicer this way.

And the same for unit tests, plus a 25-line testing 'framework'
to find all tests and fire them off automaticatically.