${policy_row_xpath}= Set Variable If '${repo}'=='${null}' //clr-dg-row[contains(.,'${name}')] //clr-dg-row[contains(.,'${name}') and contains(.,'${repo}')]
Retry Element Click ${p2p_preheat_new_policy_btn_id}
Select Distribution For P2P Preheat ${dist_name}
Retry Text Input ${p2p_preheat_name_input_id} ${policy_name}
Retry Text Input ${p2p_preheat_repoinput_id} ${repo}
Retry Text Input ${p2p_preheat_tag_input_id} ${tag}
Retry Double Keywords When Error Retry Element Click ${p2p_preheat_add_save_btn_id} Retry Wait Until Page Not Contains Element xpath=${p2p_preheat_add_save_btn_id}
Retry Double Keywords When Error Select P2P Preheat Policy ${name} Wait Until Element Is Visible //clr-main-container//project-detail//ng-component//h4[contains(.,'Executions')]
Retry Double Keywords When Error Retry Element Click ${p2p_preheat_action_btn_id} Wait Until Element Is Visible And Enabled ${p2p_preheat_edit_btn_id}
Retry Double Keywords When Error Retry Element Click ${p2p_preheat_edit_btn_id} Wait Until Element Is Visible And Enabled ${p2p_preheat_name_input_id}
Retry Text Input ${p2p_preheat_repoinput_id} ${repo}
Retry Double Keywords When Error Retry Element Click ${p2p_preheat_edit_save_btn_id} Retry Wait Until Page Not Contains Element xpath=${p2p_preheat_edit_save_btn_id}
Retry Double Keywords When Error Select P2P Preheat Policy ${name} Wait Until Element Is Visible //clr-main-container//project-detail//ng-component//h4[contains(.,'Executions')]