*** Settings *** Library REST Library SeleniumLibrary Library SeleniumScreenshots Test setup Set default headers *** Variables *** ${BASE_URL} https://plonedemo.kitconcept.com *** Keywords *** Open singleton browser [Documentation] ... Open a new browser window on the first call ... and selects that window on the subsequent calls. Open browser about:blank alias=singleton browser=headlessfirefox Get authentication token Open singleton browser Go to ${BASE_URL}/en/login Page should contain Login as Editor Click link Login as Editor Page should contain You are now logged in ${cookie}= Get cookie __ac [Return] ${cookie.value} Set default headers ${token}= Get authentication token ${headers}= Create dictionary ... Accept=application/json ... ContentType=application/json ... Cookie=__ac=${token} Set headers ${headers} *** Tasks *** Get folder listing Get ${BASE_URL}/en Output response body items 1 *** Tasks *** Get front page Go to ${BASE_URL}/en/frontpage Capture and crop page screenshot ... screenshot.png ... id:content Get ${BASE_URL}/en/frontpage Output response body text *** Tasks *** Patch front page ${payload}= Create dictionary ... title=Hello World! ... description=This is the front page. ... text=

Here be much great content very.

Patch ${BASE_URL}/en/frontpage ${payload} *** Tasks *** Get front page Go to ${BASE_URL}/en/frontpage Capture and crop page screenshot ... screenshot.png ... id:content Get ${BASE_URL}/en/frontpage Output response body text