title: I am making an autofill type bot and i have run into a little bit of a problem
body: <p>I want to make a while loop that checks if a certain error message is printed on the screen. I check to see if a current name is available to take and if it isn't I do something and if it is I do something different.
  I want it to say something like while the screen says ''Username has already been taken'' it will do one thing and if it does not come up on the screen it just skips the while loop.</p>
  
  <p>When the error message is triggered: </p>
  
  <pre><code>&lt;p id="username_notification" class="notification" style=""&gt;Username has already been taken&lt;/p&gt;
  </code></pre>
  
  <p>Also the xpath of it in case it is needed:</p>
  
  <pre><code>//*[@id="username_notification"]
  </code></pre>
  
  <p>Also probably not needed but here is the message if the username is okay to use:</p>
  
  <pre><code>&lt;p id="username_notification" class="notification" style=""&gt;Available! 
  &lt;/p&gt;
  </code></pre>
  
  <p>And xpath for that:</p>
  
  <pre><code>//*[@id="username_notification"]
  </code></pre>
  
  <h1>Its also probably obvious but I'm new to python and coding in general. Thanks!</h1>