Saving the ui frame as image (python)

Hi there,
given omni.ui window with frame and shapes in it.
how do i save the frame as image ?
thanks.