execute script to retrieve doc elements