venom
venom copied to clipboard
Name screenshot with datetime of execution
During a TestSuite, you may need to take multiple screenshot.
For at least 2 reasons, it may be useful to insert the datetime of screenshot into the file name:
- for debug purpose. You want to know how many times elasped between actions
- for sorting purpose.
Example:
name: Test Example
testcases:
- name: This is a test
context:
type: web
width: 1920
height: 1080
driver: chrome
timeout: 60
debug: true
args:
- 'disable-gpu'
- 'no-sandbox'
steps:
- action:
navigate:
url: https://www.qwant.com
assertions:
- result.title ShouldContainSubstring Qwant
screenshot: navigatedToQwant_{{.venom.datetime}}.jpg
- action:
navigate:
url: https://duckduckgo.com
assertions:
- result.title ShouldContainSubstring DuckDuckGo
screenshot: navigatedToDuckDuckGo_{{.venom.datetime}}.jpg
- action:
navigate:
url: https://www.qwant.com
assertions:
- result.title ShouldContainSubstring Qwant
screenshot: navigatedToQwant_{{.venom.datetime}}.jpg
Hope my issue understandable.