Refactored in https://github.com/Wikia/selenium-tests/commit/eb7e0caed3df6fb5c9f57070c32f15c9d2d6a669