What's the command to take a picture in Sikuli

前端 未结 3 1962
悲&欢浪女
悲&欢浪女 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:32

    The function is capture, as in

    screen = Screen()
    file = screen.capture(screen.getBounds())
    print("Saved screen as "+file)
    

    It takes a screen-shot, saves it in a file, and gives you the path to that file back.

    See the Sikuli documentation on it for full details.

提交回复
热议问题