-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Description
The following code is faulty (introduced in #35):
driver-testsuite/tests/Form/GeneralTest.php
Line 207 in 9996798
| if ($this->safePageWait(5000, 'document.getElementsByTagName("title") === "Advanced form save"')) { |
document.getElementsByTagName("title") returns a list of elements, therefore it will never be true against a string. Then what happens is that the code is stuck for 5 seconds and then simply returns true - since safePageWait() / wait() is coded to return true even when it "times out".
I would disagree with the logic behind those two methods, but that's kinda off topic.
What I think was meant to happen is to check the content of the title element? So maybe:
document.getElementsByTagName("title")[0]?.textContent === "Advanced form save"On the other hand, such a change might introduce timing issues (if that wait guard is actually checking/waiting for the wrong thing).