File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
itk_dev_shared_components/eflyt Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -144,9 +144,9 @@ def approve_case(browser: webdriver.Chrome):
144144 browser .find_element (By .ID , "ctl00_ContentPlaceHolder2_ptFanePerson_stcPersonTab1_btnGodkend" ).click ()
145145 browser .find_element (By .ID , "ctl00_ContentPlaceHolder2_ptFanePerson_stcPersonTab1_btnApproveYes" ).click ()
146146
147- approve_persons_button = browser .find_element (By .ID , "ctl00_ContentPlaceHolder2_ptFanePerson_stcPersonTab1_btnGodkendAlle" )
148- if approve_persons_button .is_enabled ():
149- approve_persons_button .click ()
147+ approve_persons_button = browser .find_elements (By .ID , "ctl00_ContentPlaceHolder2_ptFanePerson_stcPersonTab1_btnGodkendAlle" )
148+ if any ( approve_persons_button ) and approve_persons_button [ 0 ] .is_enabled ():
149+ approve_persons_button [ 0 ] .click ()
150150 else :
151151 # Approve each person individually
152152 person_count = len (browser .find_elements (By .XPATH , '//table[@id="ctl00_ContentPlaceHolder2_GridViewMovingPersons"]//tr' )) - 1
You can’t perform that action at this time.
0 commit comments