← Back to team overview

sikuli-driver team mailing list archive

[Question #696076]: capture image does not work OSX

 

New question #696076 on SikuliX:
https://answers.launchpad.net/sikuli/+question/696076

Hello!!!
my environment is:

S.O: Big Sour versión 11.2.3
MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
Pantalla retina 13,3 pulgadas (2560 × 1600)
Resolución utilizada 1680 X 1050 and 1440 X 900
Java 1.8

execution log

***** show environment for 2.0.5 API
user.home: /Users/pedropablo
work dir: /Users/pedropablo
running on macOS 10.16 from a jar
running Java Oracle Corporation 1.8.0_281-b09
java.io.tmpdir: /var/folders/pc/xyqpf_hn7yd2r_z3fbybt1b00000gn/T
app data folder: /Users/pedropablo/Library/Application Support/Sikulix
executing jar: /Users/pedropablo/tagui/src/sikulix/sikulix.jar



When you run:
java -jar /Users/pedropablo/tagui/src/sikulix/sikulix.jar -v -c -v 3

The IDE starts without problems, however when testing the options I have as a result:

.- capture image --> does not work (

.- add imagen -->  work ok
.- region  -->  work ok
.- location  -->  work ok
.- offset  -->  work ok
 

Image capture was working, but not anymore. At the moment of pressing capture screen, I select the section of the screen and then the IDE disappears, I attach log:


[debug] ButtonCapture: capture started
[debug] ScreenImage.store: /Users/pedropablo/Library/Application Support/Sikulix/SikulixStore/lastScreenShot.png
[debug] CapturePrompt: started at (948,865) as L(948,865) on 0
[debug] CapturePrompt: finished at (1181,953) as L(1181,953) on 0
[debug] ButtonCapture: finished
[debug] Image: BufferedImage: (234, 89)



As a test start a project saved a couple of days ago, where I could make the screenshot without problems, when pressing execute, the mouse moves to the image of the project, but no longer clicks, I attach log:


[debug] Jython: use as default region: R[0,0 1680x1050]@S(0)
[debug] Image: BufferedImage: (1680, 1050)
[debug] Image: reused: 1614647849963.png (file:/Users/pedropablo/tagui/flows/comisaria_virtual/BBB.sikuli/1614647849963.png)
[debug] Region: wait: waiting 3,0 secs for 1614647849963.png to appear in R[0,0 1680x1050]@S(0)
[debug] Finder2: makeMat: INT_RGB (1680x1050)
[debug] Finder2: makeMat: 3BYTE_BGR (189x59)
[debug] Finder2: doFindImage: start (stdDev: 194,8939 mean: 454,082683)
[debug] Finder2: doFindImage: in original: %72,3654 (?70) 155 msec 
[debug] Finder2: doFindImage: end 156 msec
[debug] highlight M[360,887 189x59]On(0) S 7237 for 2.0 secs
[debug] Region: wait: 1614647849963.png appeared (M[360,887 189x59]@S(0) S:0,72 C:454,916 [292 msec])
[debug] CLICK on L[454,916]@S(0) (2842 msec)
[debug] RunTime:***** running cleanUp *****

Check the settings in accessibility and screen recording. Delete them and add again, I attach LOG:

sqlite3  /Library/Application\ Support/com.apple.TCC/TCC.db 'SELECT * from access' | grep kTCCServiceAccessibility

kTCCServiceAccessibility|/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/Support/AEServer|1|2|4|1|||0|UNUSED||0|1615567531
kTCCServiceAccessibility|com.apple.Terminal|0|2|4|1|||0|UNUSED||0|1615837645
kTCCServiceAccessibility|/usr/bin/java|1|2|4|1|||0|UNUSED||0|1615838761


sqlite3  /Library/Application\ Support/com.apple.TCC/TCC.db 'SELECT * from access' | grep kTCCServiceScreenCapture

kTCCServiceScreenCapture|com.apple.Terminal|0|2|4|1|||0|UNUSED||0|1615827537
kTCCServiceScreenCapture|/usr/bin/java|1|2|4|1|||0|UNUSED||0|1615838774


Also download the latest version again, deleting the previous one, allowing it to run again and nothing.


The strange thing is that it works with the image of the project that you can save from the previous project.

I need to take screenshots because options like screenshot from OSX do not work, despite changing the image to 100% with 72 pixels.



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