Refactory automation codedui test to 3-tiers architecture