18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
_takeScreenShot() does not work in Mac OS X 10.7.5 (FF 17.0.1)
Hi
I have _takeScreenShot(); in my script. I can see this statement is executed but no image available in the log reports.
Following logs shows the image is not created due to some permission error.
I would like to know if this a known issue or is there any workaround for this ?
logType=html logDir=/Users/xxxxx/sahi_pro/userdata/logs/playback/drussanity_firefox__03Jan2013__13_14_59_073
System.getProperty("java.home") = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
keytoolPath = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool
Trying with keytoolPath: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool
Defaulting to charset iso-8859-1
Keytool command found at: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool
java.io.FileNotFoundException: /drussanity_firefox__03Jan2013__13_14_59_072_9.png (Permission denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:216)
at javax.imageio.stream.FileImageOutputStream.<init>(FileImageOutputStream.java:53)
at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(FileImageOutputStreamSpi.java:37)
at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:393)
at javax.imageio.ImageIO.write(ImageIO.java:1520)
at net.sf.sahi.util.Utils.takeSnapShot(Utils.java:301)
at net.sf.sahi.util.Utils.takeSnapShot(Utils.java:294)
at net.sf.sahi.rhino.ScriptRunner.takeSnapShot(ScriptRunner.java:431)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
I have _takeScreenShot(); in my script. I can see this statement is executed but no image available in the log reports.
Following logs shows the image is not created due to some permission error.
I would like to know if this a known issue or is there any workaround for this ?
logType=html logDir=/Users/xxxxx/sahi_pro/userdata/logs/playback/drussanity_firefox__03Jan2013__13_14_59_073
System.getProperty("java.home") = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
keytoolPath = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool
Trying with keytoolPath: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool
Defaulting to charset iso-8859-1
Keytool command found at: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/keytool
java.io.FileNotFoundException: /drussanity_firefox__03Jan2013__13_14_59_072_9.png (Permission denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:216)
at javax.imageio.stream.FileImageOutputStream.<init>(FileImageOutputStream.java:53)
at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(FileImageOutputStreamSpi.java:37)
at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:393)
at javax.imageio.ImageIO.write(ImageIO.java:1520)
at net.sf.sahi.util.Utils.takeSnapShot(Utils.java:301)
at net.sf.sahi.util.Utils.takeSnapShot(Utils.java:294)
at net.sf.sahi.rhino.ScriptRunner.takeSnapShot(ScriptRunner.java:431)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Answers
This bug has been solved and will be released in our next release which is coming out shortly. If this is very urgent, you can send an email to support@sahi.co.in and ask for the patch.
Thanks,
Regards
Ragavan