How to capture dynamic text