thanks now it's working.
1.Do you know if I can pass variable into the c# code? because I want to change the folder that I'm saving the screenshot every time.
2.I want to save the whole page, not just the top, how can it be done?
Thanks Tobias for your help.