title: How to Access Model Dialog Box content developed in Bootstrap using Selenium Web Driver and Java
body: <p>I am trying to access model dialogue box (developed in Bootstrap) using Selenium Web Driver in Java, I am unable to do so. Here i wan tot access Title, Content and Button. </p>
  
  <p>One more point is here xPath is dynamic, every time xPath is generating differently. I know that can be solved by partially matching the xPath.</p>
  
  <p>So help me to solve this problem. Here I am attaching image of my model box design.</p>
  
  <p><a href="https://i.stack.imgur.com/Y4kp6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y4kp6.png" alt="enter image description here"></a></p>
  
  <p>Here is code snippet</p>
  
  <p><a href="https://i.stack.imgur.com/1L7Hk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1L7Hk.png" alt="enter image description here"></a></p>
  
  <p>Here is code</p>
  
  <pre><code>&lt;div class="modal-dialog"&gt;
      &lt;div class="modal-content"&gt;
          &lt;div class="modal-header"&gt;
              &lt;div class="bootstrap-dialog-header"&gt;
                  &lt;div class="bootstrap-dialog-close-button" style="display: none;"&gt;
                      &lt;button class="close"&gt;
                      ×
                      &lt;/button&gt;
                  &lt;/div&gt;
                  &lt;div class="bootstrap-dialog-title" id="5f663313-d82d-4ab8-9712-6665e80a3654_title"&gt;
                  Member Registration
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
              &lt;div class="bootstrap-dialog-body"&gt;
                  &lt;div class="bootstrap-dialog-message"&gt;
                      Sample Message Sample Message Sample Message Sample Message Sample Message Sample Message.
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
              &lt;div class="bootstrap-dialog-footer"&gt;
                  &lt;div class="bootstrap-dialog-footer-buttons"&gt;
                      &lt;button class="btn btn-primary" id="353ab962-44d3-497f-8318-6db703b460d8"&gt;
                          Ok
                      &lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>