← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #691363]: When I tried taking screenshoot, the screen turned black. I use Ubuntu 18.04 on Dell laptop without any other monitor attached.

 

Question #691363 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691363

Rakha Fauzan gave more information on the question:
sorry, I should have pate the script from the start

setShowActions(True)
s0 = Screen(0).getBounds()
print s0
s1 = Screen(1).getBounds()
print s1
print "------ hover test s0"
popup("A crosshair will be displayed in upper left corner of Screen(0). Remember the monitor!")
hover(Location(s0.x+100, s0.y+100))
print Env.getMouseLocation()
print input("fill in the combination: left or right (monitor) and laptop or external (monitor)")
print input("fill in yes, if this monitor has the Windows taskbar, otherwise just klick ok")
print "------ hover test s1"
popup("A crosshair will be displayed in upper left corner of Screen(1). Remember the monitor!")
hover(Location(s1.x+100, s1.y+100))
print Env.getMouseLocation()
print input("fill in the combination: left or right (Monitor) and Laptop or External (Monitor)")
print input("fill in yes, if this monitor has the Windows taskbar, otherwise just klick ok")
print "------ capture test s0"
popup("now we try to capture the upper left corner (0,0,300,300) of Screen(0)")
img = capture(s0.x, s0.y, 300, 300)
print input("Now check the content of image file\n"+img+"\nand fill in black if this is the fact, otherwise click ok")
print "------ capture test s1"
popup("now we try to capture the upper left corner (0,0,300,300) of Screen(1)")
img = capture(s1.x, s1.y, 300, 300)
print input("Now check the content of image file\n"+img+"\nand fill in black if this is the fact, otherwise click ok")
print "------ selectRegion test s0"
popup("now you will try to select a region on Screen(0). \nIf the monitor turns black, move the mouse pointer to Screen(0) and just click right or left mouse button to cancel.\nclick OK to proceed")
r0 = selectRegion("select a Region on Screen(0)")
print r0
print Env.getMouseLocation()
if r0:
   print "------ selectRegion test s1"
   popup("now the same for Screen(1)")
   print selectRegion("select a Region on Screen(0)")
   print Env.getMouseLocation()
print "------ click test s0"
popup("after clicking OK, click somewhere in the middle of Screen(0) within 5 seconds and don't move the mouse afterwards")
wait(6)
print Env.getMouseLocation()
print "------ click test s1"
popup("after clicking OK, click somewhere in the middle of Screen(1) within 5 seconds and don't move the mouse afterwards")
wait(6)
print Env.getMouseLocation()
popup("This ends the test. The results are shown in the message area")

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.