Конечно заезженный вопрос, но никак не могу найти решение следующей ситуации: появляется окно для подтверждения действия, но саму кнопку Селениум не определяет - unable to locate element. Как я понимаю, изначально должен переключиться на это всплывающее окно, чтобы сделать его активным, но пока безуспешно. Frame нет, пытался через submit сделать, windows handles тоже не подходит. Может у кого-то есть мысли как добиться выполнения действия? Заранее спасибо за ответ!
<div class="modal-dialog type-warning ui-resizable ui-draggable" role="document" style="left: 12px; top: 12px;">
<div class="modal-content">
<div class="modal-header ui-draggable-handle">
<button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="confirmDialog.onClose()">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title ng-binding" id="myModalLabel" ng-bind="confirmDialog.title | tsq">Removing session</h4>
</div>
<div class="modal-body" style="height: auto;">
<form class="form-horizontal ng-pristine ng-valid" role="form">
<div class="form-group">
<label class="col-sm-12" style="text-align: center; font-size: 16px;">
<span ng-bind-html="confirmDialog.message | tsq | html" class="ng-binding">Are you sure you want to remove session 'Test Session'?</span>
</label>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default ng-binding" data-dismiss="modal" ng-click="confirmDialog.callback(false)" ng-bind="confirmDialog.yesNo ? 'No' : 'Cancel'">No</button>
<button type="button" class="btn btn-primary ng-binding" data-dismiss="modal" ng-click="confirmDialog.callback(true)" ng-bind="confirmDialog.yesNo ? 'Yes' : (confirmDialog.okButtonTitle ? confirmDialog.okButtonTitle : 'OK')">Yes</button>
</div>
</div>
<div class="ui-resizable-handle ui-resizable-e" style="z-index: 90;"></div><div class="ui-resizable-handle ui-resizable-w" style="z-index: 90;"></div></div>