building logic to record web test