Fix selenium tests.
(cherry picked from commit 2c7cfbb342d301402733e0885e8b06773ff7ad8a)