How to get Html output/result as string variable

cannot use ui automation