added test for dynamically created elements, using headless phantomjs