Execute optionally a script content to capture elements from an environment.