I am getting this error unless I comment out the second test’s title (source code follows):
==============================================================================
Go To Main Site | PASS |
------------------------------------------------------------------------------
[ WARN ] Keyword 'Take Screenshot' could not be run on failure:
Error: Tried to take screenshot, but no page was open.
Click Into Books | FAIL |
Error: Tried to do playwright action, but no open page.
------------------------------------------------------------------------------
Site Check | FAIL |
2 critical tests, 1 passed, 1 failed
2 tests total, 1 passed, 1 failed
==============================================================================
I looked through the documentation but did not see anything that spoke about new test stanzas causing issues. Can anyone help explain?
Thanks, Jeff
gives error:
*** Settings ***
Suite Teardown Close Browser
Library Browser
*** Variables ***
${URL} http://toscrape.com/
${MAIN_TITLE} Scraping Sandbox
${BOOKS_TITLE} All products | Books to Scrape - Sandbox
*** Test Cases ***
Go To Main Site
New Browser chromium headless=false
New Page ${URL}
Get Title == ${MAIN_TITLE}
Click Into Books
Click body > div > div:nth-child(2) > div.col-md-10 > p > a:nth-child(1)
Get Title == ${BOOKS_TITLE}
runs without error:
*** Settings ***
Suite Teardown Close Browser
Library Browser
*** Variables ***
${URL} http://toscrape.com/
${MAIN_TITLE} Scraping Sandbox
${BOOKS_TITLE} All products | Books to Scrape - Sandbox
*** Test Cases ***
Go To Main Site
New Browser chromium headless=false
New Page ${URL}
Get Title == ${MAIN_TITLE}
#Click Into Books
Click body > div > div:nth-child(2) > div.col-md-10 > p > a:nth-child(1)
Get Title == ${BOOKS_TITLE}