fix the problems with selenium webdriver 2.35.0

Fix the problems with selenium webdriver 2.35.0. It works also with previous version 2.33.0.