Skip to content

Commit a3de4e7

Browse files
committed
Generate screen dumps which include device art options
- Show warning when webp device art is found
1 parent af6e642 commit a3de4e7

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.idea/runConfigurations/dump__D__A_auto__ZB__f__tmp_f1_png.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/com/dtmilano/android/viewclient.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@author: Diego Torres Milano
1919
'''
2020

21-
__version__ = '13.4.1'
21+
__version__ = '13.5.0'
2222

2323
import sys
2424
import warnings
@@ -4054,6 +4054,8 @@ def writeImageToFile(self, filename, _format="PNG", deviceart=None, dropshadow=T
40544054
screenGlareImage = Image.open(deviceArtModelDir + '/%s%sfore.png' % (orientationName, separator))
40554055
deviceBack.paste(screenGlareImage, (0, 0), screenGlareImage)
40564056
image = deviceBack
4057+
except IOError as ex:
4058+
warnings.warn("ViewClient.writeImageToFile: Some new devices have webp art which is still not supported by ViewClient")
40574059
except ImportError as ex:
40584060
self.pilNotInstalledWarning()
40594061
else:

tools/culebra

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ___________________/ /__/ /__/ /__/ /________________________________
2020
2121
'''
2222

23-
__version__ = '13.4.1'
23+
__version__ = '13.5.0'
2424

2525
import calendar
2626
import codecs
@@ -1243,8 +1243,8 @@ class CulebraTests(CulebraTestCase):
12431243

12441244
if options[CulebraOptions.SAVE_SCREENSHOT]:
12451245
print '''\
1246-
self.vc.writeImageToFile('%s')
1247-
''' % options[CulebraOptions.SAVE_SCREENSHOT]
1246+
self.vc.writeImageToFile('%s', 'PNG', %s, %s, %s)
1247+
''' % (options[CulebraOptions.SAVE_SCREENSHOT], options[CulebraOptions.DEVICE_ART], options[CulebraOptions.DROP_SHADOW], options[CulebraOptions.SCREEN_GLARE])
12481248

12491249
if options[CulebraOptions.USE_DICTIONARY]:
12501250
print '''\
@@ -1301,8 +1301,8 @@ vc = ViewClient(device, serialno, **kwargs2)
13011301

13021302
if options[CulebraOptions.SAVE_SCREENSHOT]:
13031303
print '''\
1304-
vc.writeImageToFile('%s')
1305-
''' % options[CulebraOptions.SAVE_SCREENSHOT]
1304+
vc.writeImageToFile('%s', 'PNG', %s, %s, %s)
1305+
''' % (options[CulebraOptions.SAVE_SCREENSHOT], options[CulebraOptions.DEVICE_ART], options[CulebraOptions.DROP_SHADOW], options[CulebraOptions.SCREEN_GLARE])
13061306

13071307
if vc:
13081308
vc.dump(window=options[CulebraOptions.WINDOW])

0 commit comments

Comments
 (0)