I have a webpage that has a button to download a file. Once clicking the button there appears a modal dialog popup which has no buttons for 'Ok' or 'Cancel' it is just informative dialog that says 'Generating the debuginfo file. Please wait.'. In my ui testing I need to check for the presence of that dialog. The html code for this modal dialog is as provided below. How should I check the presence of the dialog?
I have tried using Alert class and using Alert(driver).switch_to.alert()
and Alert(driver).dismiss()
and accept()
I have also tried
WebDriverWait(self.driver, 10).until(EC.presence_of_element_located((By.ID, "id_value")))
EDIT: edited to add actual code.
The html code for this element has following parameters:
<div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-draggable ui-resizable" style="position: fixed; height: auto; width: 400px; top: 143px; left: 555.5px; display: block;" tabindex="-1" role="dialog" aria-describedby="dialog" aria-labelledby="ui-id-1">
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">
<span id="ui-id-1" class="ui-dialog-title">Download debug info</span>
<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only ui-dialog-titlebar-close" role="button" aria-disabled="false" title="close">
<span class="ui-button-icon-primary ui-icon ui-icon-closethick">
</span>
<span class="ui-button-text">close</span>
</button>
</div>
<div id="dialog" class="ui-dialog-content ui-widget-content" style="width: auto; min-height: 0px; max-height: none; height: 177px;">
<br>Generating the debuginfo file. Please wait.</div>
<div class="ui-resizable-handle ui-resizable-n" style="z-index: 90;">
</div>
<div class="ui-resizable-handle ui-resizable-e" style="z-index: 90;">
</div>
<div class="ui-resizable-handle ui-resizable-s" style="z-index: 90;">
</div>
<div class="ui-resizable-handle ui-resizable-w" style="z-index: 90;">
</div>
<div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se" style="z-index: 90;">
</div>
<div class="ui-resizable-handle ui-resizable-sw" style="z-index: 90;">
</div>
<div class="ui-resizable-handle ui-resizable-ne" style="z-index: 90;">
</div>
<div class="ui-resizable-handle ui-resizable-nw" style="z-index: 90;">
</div>