Timeline for What to do when waiting for an element to appear isn't enough?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 12, 2015 at 19:51 | comment | added | GKS1 | Maybe my description of the problem isn't clear. The element is added to the DOM, I have no problem waiting for that... But the added element has some click event which is bound after it is already in the DOM. So waiting for it to be in the DOM is not enough, and my selenium test clicks the element too soon (as soon as it is in the DOM, but before the javascript is attached to it). So clicking the element doesn't actually do anything, and the test fails | |
Mar 12, 2015 at 19:48 | comment | added | kirbycope | @GKS1, The code/link I provided will help you wait until the element is in the DOM. You could set it up to wait for an element that the JS adds to the DOM. | |
Mar 12, 2015 at 19:43 | comment | added | GKS1 | Hmm, this doesn't seem to answer my question though. Does the implicit wait know to wait for all the relevant javascript to load? Or will I run into this same race condition that I am seeing with explicit waits? | |
Mar 12, 2015 at 19:41 | history | answered | kirbycope | CC BY-SA 3.0 |