What's the command to take a picture in Sikuli

前端 未结 3 1960
悲&欢浪女
悲&欢浪女 2021-02-08 06:38

I\'m using Sikuli IDE. I\'d like to know what the command to take a screenshot is, so I can capture the screen at the end of a test.

Something like this



        
3条回答
  •  无人及你
    2021-02-08 07:43

    To make a screenshot of the window that has focus you simple can use:

    focusWindow = App.focusedWindow()
    regionImage = capture(focusWindow)
    shutil.move(regionImage, os.path.join(r'C:\Screenshots', 'Dummy1.png'))
    

提交回复
热议问题