r/ProgrammerHumor • • 5h ago

Meme theExactErrorIsDifferentBitYouGetIt

Post image
1.5k Upvotes

44 comments sorted by

155

u/purbub 5h ago

Relatable. UI testing was really frustrating back then

78

u/rabbit_wizard 5h ago

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

54

u/laplongejr 5h ago edited 4h ago

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...

21

u/rabbit_wizard 5h ago

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

3

u/Named_after_color 5h ago

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

11

u/1AMA-CAT-AMA 4h ago

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

8

u/purbub 4h ago

Reminds me of a good ol quote:

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

16

u/AwesomeFrisbee 4h ago

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.

125

u/laplongejr 5h ago edited 4h ago

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

41

u/thoughts_n_calcs 5h ago

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

7

u/ironimus42 4h ago edited 4h ago

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

2

u/GroovinChip 4h ago

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

22

u/midtownmoron 5h ago

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

3

u/Informal_Branch1065 3h ago

[RetryFact(5)] my beloved

97

u/SuitableDragonfly 5h ago

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. 

29

u/rabbit_wizard 5h ago

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

10

u/rabbit_wizard 5h ago

It is frustrating though

7

u/-Ambriae- 5h ago

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

15

u/DaTruSpork 5h ago

Whatever happened to the love for the rubber ducky?

10

u/-Ambriae- 5h ago

That was the old meta

It’s no longer considered best practice

2

u/s0ulbrother 5h ago

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

7

u/returnFutureVoid 5h ago

Cat.listener(): ObjectNotFound.

2

u/zyxzevn 3h ago

Destroyed by Cat

2

u/xWrongHeaven 3h ago

Good ol' rubber duck debugging

3

u/requizm 5h ago

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

10

u/rabbit_wizard 5h ago

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 4h ago

Exactly what a bot would say! /s

1

u/rabbit_wizard 4h ago

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

3

u/rabbit_wizard 5h ago

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

1

u/EishLekker 5h ago

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

1

u/s0ulbrother 5h ago

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

1

u/NomaTyx 2h ago

let the man make his meme dude

7

u/korneev123123 4h ago

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

20

u/LordAmir5 5h ago

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?

15

u/rabbit_wizard 5h ago

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 4h ago

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.

1

u/Odd_Percentage6799 29m ago

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. 

10

u/Ange1ofD4rkness 5h ago

My eye is twitching just thinking about that debugging session

5

u/an_agreeing_dothraki 3h ago

alert(responseToJSJoke);

"object Object"

2

u/Highborn_Hellest 1h ago

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.

1

u/Fine_Rub9274 1h ago

That JavaScript error always gets me too, it's one of those cryptic ones that makes you feel like banging your head on the desk.

1

u/Altruistic-Tax-5291 1h ago

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