How to Access Model Dialog Box content developed in Bootstrap using Selenium Web Driver and Java -


i trying access model dialogue box (developed in bootstrap) using selenium web driver in java, unable so. here wan tot access title, content , button.

one more point here xpath dynamic, every time xpath generating differently. know can solved partially matching xpath.

so me solve problem. here attaching image of model box design.

enter image description here

here code snippet

enter image description here

here code

<div class="modal-dialog">     <div class="modal-content">         <div class="modal-header">             <div class="bootstrap-dialog-header">                 <div class="bootstrap-dialog-close-button" style="display: none;">                     <button class="close">                     ×                     </button>                 </div>                 <div class="bootstrap-dialog-title" id="5f663313-d82d-4ab8-9712-6665e80a3654_title">                 member registration                 </div>             </div>         </div>         <div class="modal-body">             <div class="bootstrap-dialog-body">                 <div class="bootstrap-dialog-message">                     sample message sample message sample message sample message sample message sample message.                 </div>             </div>         </div>         <div class="modal-footer">             <div class="bootstrap-dialog-footer">                 <div class="bootstrap-dialog-footer-buttons">                     <button class="btn btn-primary" id="353ab962-44d3-497f-8318-6db703b460d8">                         ok                     </button>                 </div>             </div>         </div>     </div> </div> 

//div[@class="bootstrap-dialog-title"] title  //div[@class="bootstrap-dialog-message"] message  //div[@class="bootstrap-dialog-footer-buttons"]/button buttton 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -