allow to capture a loaded webpage
small refactoring