title: How to use UrlToBe in selenium for only part of the URL
body: <p>I have a requirement two requirements in Selenium Chrome driver automation using .net.</p>
  
  <ol>
  <li>Waiting for particular base URL to load. For that I got the below code which works perfectly if I gave the exact URL, </li>
  </ol>
  
  
  
  <pre><code>wait.Until(ExpectedConditions.UrlToBe("https://accounts.google.com/ServiceLogin?service=mail&amp;passive=true&amp;rm=false&amp;continue=https://mail.google.com/mail/&amp;ss=1&amp;scc=1&amp;ltmpl=default&amp;ltmplcache=2&amp;emr=1&amp;osid=1#identifier"))
  </code></pre>
  
  <p>but I dont want to give the exact URL, instead I want to give base URL since the most of the URL's are dynamically generated with some IDs. So here in my case I want to match <a href="https://accounts.google.com" rel="nofollow">https://accounts.google.com</a>, </p>
  
  <ol start="2">
  <li>I want to get a event before the URL is going to change (when user clicks on some button for example next). or I want to get notified when user has entered  the username or some entries in the webpage.</li>
  </ol>
  
  <p>My complete requirement is as follows,</p>
  
  <p>For the first time user will enter username, date of birth manually in the automated window. Now my requirement is when user opens my application for next time I want to enter the name and D.O.B using code.</p>
  
  <p>Previously I was using Internet Explorer and there I had beforenavigate event which will inform me that user is going navigating to other URL. So I used to read the required fields and save it in my database.</p>
  
  <p>How to do this in Selenium or Chrome driver ?</p>
  
  <p>WebElement.getAttribute('value') can be used to get the value, but how to know that user has entered the values to that field ?</p>
  
  <p>How can I achieve these 2 ?
  Please help me. </p>