title: How to write xpath for span element which generate messages dynamically?
body: <p>In the app I used, resolutions will be there to which a user can commit.
  I committed to a resolution, which gives a message:</p>
  
  <blockquote>
    <p>You have committed successfully to this resolution'. Here is the html code for that message.</p>
  </blockquote>
  
  <p>HTML for that messages is:</p>
  
  <pre><code>&lt;div id="sliding_info_container" class="hidden" style="display: none;"&gt;
  &lt;span id="sliding_info" class="success"&gt;You have committed successfully to this resolution&lt;/span&gt;
  </code></pre>
  
  <p>Now if I uncommit that resolution, app gives another message:</p>
  
  <blockquote>
    <p>Resolution uncommitted successfully</p>
  </blockquote>
  
  <p>Here is the HTML code for that message:</p>
  
  <pre><code>&lt;div id="sliding_info_container" class="hidden" style="display: block;"&gt;
  &lt;span id="sliding_info" class="success"&gt;Resolution uncommitted successfully&lt;/span&gt;
  </code></pre>
  
  <p>My script for first action contains <code>xpath=//div/span[@class="success"], value=You have committed successfuly to this resolution</code>.
  When I run this command selenium gives an error:  <strong>Actual value 'Resolution uncommitted successfully' did not match 'You have committed successfully to this resolution'</strong></p>
  
  <p>What I have given in the script is the right value, and that is the message app is displaying. Why selenium is giving out error for a valid command? </p>