Example code:
<div class="modal-footer">
<button type="button" class="btn btn-primary btn-block" data-modal="AlertSubmitApproval" id="btn_close_modal">ตกลง</button>
</div>
I try to click the button id="btn_close_modal"
but it seems like the button is not visible then robot response ElementNotVisibleException: Message: element not interactable
, in spite of the fact I able to click by manual.
My robot code:
Request approve
Selenium2Library.Click Element &{Landing}[reqApprove]
Sleep 2s
Selenium2Library.Click Element &{Landing}[cofReq]
Sleep 2s
Selenium2Library.Wait Until Page Contains Element id=btn_close_modal timeout=20s
Sleep 3s
Selenium2Library.Click Element id=btn_close_modal
How can I able to click the button id=btn_close_modal
, please could anyone help.