Optimization and support of UI automated tests are the main and important stage of UI automated testing process in general. At an early stage of the introduction of the UI automation process and script coverage of autotests, little attention is paid to optimizing of test code, implementing design patterns, using universal validators, and using dynamic waiters. As a result, a significant amount of resources is spent in the future to support UI automated tests. As a result, there may be a situation where all the resources of the automation department go exclusively to support tests, there comes a so-named loop process and there are no resources left to cover the functionality of the project with new tests. This report examines techniques for optimizing UI automated tests for Selenium WebDriver at various levels of abstraction and analyzes errors that beginners often allow. These optimization techniques will help the beginning UI automation Engineer.