That programmer's high...
-
I've spent hours, spread over days, on some #$&#$!*@!^#!* issue with Selenium and Protractor. I had a test that sometimes worked fine (mostly the first two or three times) and most of the times didn't. Searching, rewriting, waiting, logging, nothing seemed to help... I already found the server looped infinitely trying to get an element on my page. And just now, I noticed the server always started looping at the same spot (which was pretty hard to see and remember sometimes it didn't loop at all and everything just worked). So I fetch an element, click a button which removes the element from the DOM and then wait for the element to be removed from the DOM. I guess sometimes the element removing would be a bit slower and the waiting occurred before the removal (it's all JavaScript multithreading/callbacks/promises, yuk...). However, when the element would be gone before the waiting commenced the waiting would try to fetch the element to get it's status, couldn't find it, tried to find it again, couldn't find it, tried to find it again... Fixed by just waiting a second. So glad I've FINALLY found that issue! Time to celebrate :D
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
With a glass of DOM perignon, no doubt.
I wanna be a eunuchs developer! Pass me a bread knife!
-
I've spent hours, spread over days, on some #$&#$!*@!^#!* issue with Selenium and Protractor. I had a test that sometimes worked fine (mostly the first two or three times) and most of the times didn't. Searching, rewriting, waiting, logging, nothing seemed to help... I already found the server looped infinitely trying to get an element on my page. And just now, I noticed the server always started looping at the same spot (which was pretty hard to see and remember sometimes it didn't loop at all and everything just worked). So I fetch an element, click a button which removes the element from the DOM and then wait for the element to be removed from the DOM. I guess sometimes the element removing would be a bit slower and the waiting occurred before the removal (it's all JavaScript multithreading/callbacks/promises, yuk...). However, when the element would be gone before the waiting commenced the waiting would try to fetch the element to get it's status, couldn't find it, tried to find it again, couldn't find it, tried to find it again... Fixed by just waiting a second. So glad I've FINALLY found that issue! Time to celebrate :D
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
DOM == Destruction of Sanity
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
-
DOM == Destruction of Sanity
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
Brisingr Aerowing wrote:
DOM == Destruction of Sanity
Shouldn't that be "Definition of Madness"? :)
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
-
DOM == Destruction of Sanity
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
Coincidentally, "Dom" is also the Dutch word for "Dumb" :D
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
-
With a glass of DOM perignon, no doubt.
I wanna be a eunuchs developer! Pass me a bread knife!
Hold still Mark. We're going to have to hurt you now. :rolleyes:
Software Zen:
delete this;
-
I've spent hours, spread over days, on some #$&#$!*@!^#!* issue with Selenium and Protractor. I had a test that sometimes worked fine (mostly the first two or three times) and most of the times didn't. Searching, rewriting, waiting, logging, nothing seemed to help... I already found the server looped infinitely trying to get an element on my page. And just now, I noticed the server always started looping at the same spot (which was pretty hard to see and remember sometimes it didn't loop at all and everything just worked). So I fetch an element, click a button which removes the element from the DOM and then wait for the element to be removed from the DOM. I guess sometimes the element removing would be a bit slower and the waiting occurred before the removal (it's all JavaScript multithreading/callbacks/promises, yuk...). However, when the element would be gone before the waiting commenced the waiting would try to fetch the element to get it's status, couldn't find it, tried to find it again, couldn't find it, tried to find it again... Fixed by just waiting a second. So glad I've FINALLY found that issue! Time to celebrate :D
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
So your "wait to see if the element is removed" would loop forever because it couldn't find the element if the element was already removed? That is just too weird. But congrats on finding the problem! Marc
Latest Article - Merkle Trees Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
So your "wait to see if the element is removed" would loop forever because it couldn't find the element if the element was already removed? That is just too weird. But congrats on finding the problem! Marc
Latest Article - Merkle Trees Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
Marc Clifton wrote:
So your "wait to see if the element is removed" would loop forever because it couldn't find the element if the element was already removed?
Exactly.
Marc Clifton wrote:
That is just too weird.
That's why it took me so long to find :laugh:
Marc Clifton wrote:
But congrats on finding the problem!
Thanks! :D
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
-
I've spent hours, spread over days, on some #$&#$!*@!^#!* issue with Selenium and Protractor. I had a test that sometimes worked fine (mostly the first two or three times) and most of the times didn't. Searching, rewriting, waiting, logging, nothing seemed to help... I already found the server looped infinitely trying to get an element on my page. And just now, I noticed the server always started looping at the same spot (which was pretty hard to see and remember sometimes it didn't loop at all and everything just worked). So I fetch an element, click a button which removes the element from the DOM and then wait for the element to be removed from the DOM. I guess sometimes the element removing would be a bit slower and the waiting occurred before the removal (it's all JavaScript multithreading/callbacks/promises, yuk...). However, when the element would be gone before the waiting commenced the waiting would try to fetch the element to get it's status, couldn't find it, tried to find it again, couldn't find it, tried to find it again... Fixed by just waiting a second. So glad I've FINALLY found that issue! Time to celebrate :D
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
-
I've spent hours, spread over days, on some #$&#$!*@!^#!* issue with Selenium and Protractor. I had a test that sometimes worked fine (mostly the first two or three times) and most of the times didn't. Searching, rewriting, waiting, logging, nothing seemed to help... I already found the server looped infinitely trying to get an element on my page. And just now, I noticed the server always started looping at the same spot (which was pretty hard to see and remember sometimes it didn't loop at all and everything just worked). So I fetch an element, click a button which removes the element from the DOM and then wait for the element to be removed from the DOM. I guess sometimes the element removing would be a bit slower and the waiting occurred before the removal (it's all JavaScript multithreading/callbacks/promises, yuk...). However, when the element would be gone before the waiting commenced the waiting would try to fetch the element to get it's status, couldn't find it, tried to find it again, couldn't find it, tried to find it again... Fixed by just waiting a second. So glad I've FINALLY found that issue! Time to celebrate :D
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
-
I've spent hours, spread over days, on some #$&#$!*@!^#!* issue with Selenium and Protractor. I had a test that sometimes worked fine (mostly the first two or three times) and most of the times didn't. Searching, rewriting, waiting, logging, nothing seemed to help... I already found the server looped infinitely trying to get an element on my page. And just now, I noticed the server always started looping at the same spot (which was pretty hard to see and remember sometimes it didn't loop at all and everything just worked). So I fetch an element, click a button which removes the element from the DOM and then wait for the element to be removed from the DOM. I guess sometimes the element removing would be a bit slower and the waiting occurred before the removal (it's all JavaScript multithreading/callbacks/promises, yuk...). However, when the element would be gone before the waiting commenced the waiting would try to fetch the element to get it's status, couldn't find it, tried to find it again, couldn't find it, tried to find it again... Fixed by just waiting a second. So glad I've FINALLY found that issue! Time to celebrate :D
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
Glad to hear it. So everyone's invited to the bar Friday night? Sander's buying! :laugh:
-
Sander Rossel wrote:
Fixed by just waiting a second.
Do I understand this right -- you "fixed" the bug by waiting a second instead of polling the element's status?
We can program with only 1's, but if all you've got are zeros, you've got nothing.
Yeah, because polling the element's status wasn't going to work. Mind you, this is third-party software behavior. If it were my own I'd fix the infinite loop instead. Anyway, if this task takes longer than a second that's probably a bug too.
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
-
Yeah, because polling the element's status wasn't going to work. Mind you, this is third-party software behavior. If it were my own I'd fix the infinite loop instead. Anyway, if this task takes longer than a second that's probably a bug too.
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
Sander Rossel wrote:
Anyway, if this task takes longer than a second that's probably a bug too.
Or its running on someone else's machine :) Poorly written third party software is the worst. Glad you found a way around them.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
-
I've spent hours, spread over days, on some #$&#$!*@!^#!* issue with Selenium and Protractor. I had a test that sometimes worked fine (mostly the first two or three times) and most of the times didn't. Searching, rewriting, waiting, logging, nothing seemed to help... I already found the server looped infinitely trying to get an element on my page. And just now, I noticed the server always started looping at the same spot (which was pretty hard to see and remember sometimes it didn't loop at all and everything just worked). So I fetch an element, click a button which removes the element from the DOM and then wait for the element to be removed from the DOM. I guess sometimes the element removing would be a bit slower and the waiting occurred before the removal (it's all JavaScript multithreading/callbacks/promises, yuk...). However, when the element would be gone before the waiting commenced the waiting would try to fetch the element to get it's status, couldn't find it, tried to find it again, couldn't find it, tried to find it again... Fixed by just waiting a second. So glad I've FINALLY found that issue! Time to celebrate :D
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
Selenium is an open source automated testing suite for web applications across different browsers and platforms. Selenium is one of the widely used automation testing tools because of its various advantages. Testers prefer Selenium over any other tool due to its ease of use, availability and simplicity. Testers lives have been made easier with the Learning of selenium for automated testing. It has attracted many eyeballs and become a favorite tool among automation testers.