[1.6.x] Fixed a deprecation warning in a selenium test.

Backport of 9b471a8fe3 from master