File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Capture Element Screenshot
88 [Setup] Remove Files ${OUTPUTDIR } /selenium-element-screenshot-1.png
99 ${path } = Capture Element Screenshot id:nothing
1010 File Should Exist ${OUTPUTDIR } /selenium-element-screenshot-1.png
11- Should Be Equal ${path } ${OUTPUTDIR } / selenium-element-screenshot-1.png
11+ Should Be Equal ${path } ${OUTPUTDIR }${ / } selenium-element-screenshot-1.png
1212
1313Capture Element Screenshot When Element Does Not Exist
1414 Run Keyword And Expect Error
@@ -17,9 +17,9 @@ Capture Element Screenshot When Element Does Not Exist
1717
1818Capture Element Screenshot When Path Does Not Exist
1919 [Setup] Remove Directory ${OUTPUTDIR } /elements_pictures
20- ${path } = Capture Element Screenshot id:nothing ${OUTPUTDIR } / elements_pictures/ selenium-element-screenshot-1.png
21- File Should Exist ${OUTPUTDIR } / elements_pictures/ selenium-element-screenshot-1.png
22- Should Be Equal ${path } ${OUTPUTDIR } / elements_pictures/ selenium-element-screenshot-1.png
20+ ${path } = Capture Element Screenshot id:nothing ${OUTPUTDIR }${ / } elements_pictures${ / } selenium-element-screenshot-1.png
21+ File Should Exist ${OUTPUTDIR }${ / } elements_pictures${ / } selenium-element-screenshot-1.png
22+ Should Be Equal ${path } ${OUTPUTDIR }${ / } elements_pictures${ / } selenium-element-screenshot-1.png
2323
2424Capture Element Screenshot When No Browser Is Open
2525 [Setup] Close All Browsers
Original file line number Diff line number Diff line change 11import json
22import os
3+ import platform
4+
5+ from robot .api import logger
36
47
58class BigListOfNaughtyStrings (object ):
@@ -8,6 +11,9 @@ class BigListOfNaughtyStrings(object):
811 """
912
1013 def get_blns (self ):
14+ if platform .system () == 'Windows' :
15+ logger .warn ('Rading Big List of Naughty Strings does not work in Windows OS' )
16+ return []
1117 cur_dir = os .path .dirname (os .path .abspath (__file__ ))
12- blns = open (os .path .join (cur_dir , 'blns.json' ), 'r' )
13- return json .load (blns )
18+ with open (os .path .join (cur_dir , 'blns.json' ), 'r' ) as blns :
19+ return json .load (blns )
You can’t perform that action at this time.
0 commit comments