Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
troglodyne opened this issue Aug 7, 2017 · 3 comments
Assignees
Milestone

Comments

@troglodyne
Copy link

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.

@teodesian teodesian self-assigned this Aug 9, 2017
@teodesian teodesian added this to the 1.21 milestone Aug 9, 2017
@teodesian
Copy link
Owner

yep, sounds like a bug

troglodyne added a commit to troglodyne/Selenium-Remote-Driver that referenced this issue Aug 10, 2017
It just wasn't setting sane defaults before running regex replace.
This commit additionally adds test coverage for the modified
subroutine, hopefully in the correct place.

I also added a block to properly include the libdir when running
the affected test via prove (so that you don't have to use -Ilib
or something like that) whenever we're not running the test via
'dzil test' or anything else where we've plopped the libs and
tests in a temporary '.build' directory.
troglodyne added a commit to troglodyne/Selenium-Remote-Driver that referenced this issue Aug 10, 2017
It just wasn't setting sane defaults before running regex replace.
This commit additionally adds test coverage for the modified
subroutine, hopefully in the correct place.

I also added a block to properly include the libdir when running
the affected test via prove (so that you don't have to use -Ilib
or something like that) whenever we're not running the test via
'dzil test' or anything else where we've plopped the libs and
tests in a temporary '.build' directory.
@troglodyne
Copy link
Author

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 added a commit to troglodyne/Selenium-Remote-Driver that referenced this issue Oct 31, 2017
@troglodyne
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants