<commit_before>* Settings *
Resource     ../resource.txt
Suite Setup  Go To  ${ROOT}links.html

* Test Cases *

Capture screenshot to default location 
  [Documentation]  LOG 1  </td></tr><tr><td colspan="3"><a href="selenium-screenshot-1.png"><img src="selenium-screenshot-1.png" width="800px"></a>
  [Setup]  Remove Files  ${OUTPUTDIR}/selenium-screenshot-*.png
  Capture Screenshot
  File Should Exist  ${OUTPUTDIR}/selenium-screenshot-1.png
  Click Link  Relative
  Capture Screenshot
  File Should Exist  ${OUTPUTDIR}/selenium-screenshot-2.png

Capture screenshot to custom file
  [Setup]  Remove Files  ${OUTPUTDIR}/custom-screenshot.png
  Capture Screenshot  custom-screenshot.png
  File Should Exist  ${OUTPUTDIR}/custom-screenshot.png

Capture screenshot to custom directory
  [Setup]  Remove Files  ${TEMPDIR}/seleniumlibrary-screenshot-test.png<commit_msg>Cannot trust indices because other tests take screenshots too<commit_after>* Settings *
Resource     ../resource.txt
Suite Setup  Go To  ${ROOT}links.html

* Test Cases *

Capture screenshot to default location 
  [Documentation]  LOG 1  REGEXP: </td></tr><tr><td colspan="3"><a href="selenium-screenshot-\\d.png"><img src="selenium-screenshot-\\d.png" width="800px"></a>
  [Setup]  Remove Files  ${OUTPUTDIR}/selenium-screenshot-*.png
  Capture Screenshot
  ${count} =  Count Files In Directory  ${OUTPUTDIR}  selenium-screenshot-?.png
  Should Be Equal As Integers  ${count}  1
  Click Link  Relative
  Capture Screenshot
  ${count} =  Count Files In Directory  ${OUTPUTDIR}  selenium-screenshot-?.png
  Should Be Equal As Integers  ${count}  2

Capture screenshot to custom file
  [Setup]  Remove Files  ${OUTPUTDIR}/custom-screenshot.png
  Capture Screenshot  custom-screenshot.png
  File Should Exist  ${OUTPUTDIR}/custom-screenshot.png

Capture screenshot to custom directory
  [Setup]  Remove Files  ${TEMPDIR}/seleniumlibrary-screenshot-test.png
{'fraction_non_alphanumeric': 0.11510416666666666, 'fraction_numerical': 0.008333333333333333, 'mean_word_length': 4.426553672316384, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2965942', 'n_tokens_mistral': 644, 'n_tokens_neox': 600, 'n_words': 164}