Selenium-Remote-Driver icon indicating copy to clipboard operation
Selenium-Remote-Driver copied to clipboard

Use of uninitialized value in substitution iterator at /path/to/Selenium/Remote/Commands.pm line 460.

Open troglodyne opened this issue 8 years ago • 3 comments

I've noticed sometimes in tests (particularly when rewriting the error_handler to not die, not sure how that's the "magic" to it) that on failure to find_element you'll see the aforementioned error.

When looking at the code, it doesn't look like we're verifying the args are strings before doing regexp on them, so it shouldn't be too surprising we see this occasionally. The subroutine probably just needs to replace with blank string if the argument we're doing substitution with is undef.

troglodyne avatar Aug 07 '17 19:08 troglodyne

yep, sounds like a bug

teodesian avatar Aug 09 '17 13:08 teodesian

Made PR #332 to address this and up test cover for the affected subroutine.

Also did some things to the test to make my life easier when prototyping the test update. If you don't like em, feel free to holler and I'll pare it down to just the added assertions.

troglodyne avatar Aug 10 '17 03:08 troglodyne

K, pushed a commit that should fix those tests, as suspected better mocks were the fix

troglodyne avatar Oct 31 '17 02:10 troglodyne