[IMP] test_ui shorter code
[IMP] phantomjs helper simplification