В моем тестовом примере ниже, если ключевое слово Сравнить системное время, полученное в момент создания, со временем, записанным в макете , должно выполнить второе ключевое слово Добавить время к системному времени и сравнить со временем, записанным в макете Должно перейти на третье ключевое слово Вычесть время из системного времени и сравнить его со временем, записанным в макете , если второе ключевое слово также дает сбой. Пожалуйста, помогите мне сконструировать его как условный оператор в . Убедитесь, что последняя последняя измененная / созданная оценка превысила список
*** Settings ***
Resource ../settings.robot
*** Variables ***
${modified_date_row_1} css=#estimateTable > tbody > tr.item-name.highlighted > td:nth-child(4)
*** Test Cases ***
Last modified/created estimates should top the list of estimates displayed
Verify that the last last modified/created estimate tops the list
*** Keywords ***
Compare system time retrieved at the time of creation with time recorded in the layout
Sleep 5s
${get_modified_date_row_1} Get Text ${modified_date_row_1}
${compare} Should Be Equal ${get_modified_date_row_1} ${date_time}
Add time to sys time and compare it with time recorded in the layout
Sleep 5s
${get_modified_date_row_1} Get Text ${modified_date_row_1}
${add_time} Add Time To Date ${sys_date_time} 01:00
${converted_add_time} Convert Date ${add_time} result_format=%b %d %Y %I:%M %p
${compare} Should Be Equal ${get_modified_date_row_1} ${converted_add_time}
Subtract time from sys time and compare it with time recorded in the layout
Sleep 5s
${get_modified_date_row_1} Get Text ${modified_date_row_1}
${subtract_time} Subtract Time From Date ${sys_date_time} 01:00
${converted_sub_time} Convert Date ${subtract_time} result_format=%b %d %Y %I:%M %p
${compare} Should Be Equal ${get_modified_date_row_1} ${converted_sub_time}
Verify that the last last modified/created estimate tops the list
Run Keyword If Compare system time retrieved at the time of creation with time recorded in the layout == 'FAIL' Add time to sys time and compare it with time recorded in the layout
... ELSE IF Add time to sys time and compare it with time recorded in the layout == 'FAIL' Subtract time from sys time and compare it with time recorded in the layout