RE: how to handle boot box window alert in selenium webdriver?

Answered

I

surekha Train Asked on September 22, 2014 in Selenium WebDriver.
Add Comment
4 Answers

in this There is no id to find.Here is my code:

<div class=”bootbox modal fade bootbox-confirm in” tabindex=”-1″ role=”dialog” aria-hidden=”false” style=”display: block;”>
<div class=”modal-dialog”>
<div class=”modal-content”>
<div class=”modal-body”>
<button type=”button” class=”bootbox-close-button close” style=”margin-top: -10px;”>×</button>
<div class=”bootbox-body”>Are you sure you want to unsuspend the selected company/companies and respective users ?</div>
</div>
<div class=”modal-footer”>
<button data-bb-handler=”cancel” type=”button” class=”btn btn-default”>Cancel</button>
<button data-bb-handler=”confirm” type=”button” class=”btn btn-primary”>OK</button>
</div>
</div>
</div>
</div>

Train Answered on September 22, 2014.

Hi
use
driver.findelement(by.xpath(“//button[text()=’OK’]”)).click();

on September 22, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.