Improve selenium script