With RobotFramework, using the 'Browser' library.
using the code:
*** Settings ***
Library Browser enable_presenter_mode=True
Library XML
Library Collections
Library String
Library DateTime
Documentation FUTURE CHRISTMAS
*** Variables ***
${Date}= 2023-12-25 00:00:00.000000
*** Test Cases ***
Find the future christmasday
Open Browser https://obstaclecourse.tricentis.com/Obstacles/21269
sleep 3s
[Arguments] ${Date}
${Day}= Convert Date ${Date} result_format=%A
# [Return] ${Day}
#${date2}= DateTime.Get Current Date
#Log To Console ${Day}
#Log To Console ${date2}
Click id=christmasday
Fill Text id=christmasday ${Day}
Sleep 2s
# used resources :
# https://stackoverflow.com/questions/42356100/how-can-i-retrieve-the-day-of-the-week-from-date
#
It results in the message:
==============================================================================
Test5 21269 :: FUTURE CHRISTMAS
==============================================================================
[ WARN ] Open Browser is for quick experimentation and debugging only. Use New Page for production.
Find the future christmasday | PASS |
------------------------------------------------------------------------------
[ WARN ] Keyword 'Take Screenshot' could not be run on failure:
Error: Tried to take screenshot, but no page was open.
[Arguments] 2023-12-25 00:00:00.000000
[ FAIL ] Error: Tried to do playwright action, but no open page.
There's an open page, I have no clue where the error message comes from.