title: Chrome inspect, cant locate element by xpath I just copied
body: <p>I have a spinner icon poping up dynamically on page indicating page is loading, I need to detect when it disappears (this bit is clear for me) </p>
  
  <p>Every time I click on this spinner inside google chrome inspect, and I press copy xpath, I get this one:</p>
  
  <pre><code>/html/body/vr-root/vr-route-handler/vr-layout/mat-sidenav-container/mat-sidenav-content/div/mat-sidenav-container/mat-sidenav-content/div/div/bs-campus/div/div/bs-data-grid/div/div[2]/mat-spinner/svg/circle
  </code></pre>
  
  <p>But when I try to locate this element (even inside Chrome inspect tool pressing CTR+F, it does not find it.</p>
  
  <p>Is there any different way to locate it? I have tried to search it with relative xpath, but it fails too:</p>
  
  <pre><code>.//div/mat-spinner
  </code></pre>
  
  <p>Edit: added picture</p>
  
  <p><a href="https://i.stack.imgur.com/E6gS7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E6gS7.png" alt="enter image description here"></a></p>
  
  <p>Edit 2: when I pause page in Chrome Inspect -> Source -> Pause script execution, I am able to search and find (ctr+f) element in chrome inspect by:</p>
  
  <pre><code>.//mat-spinner
  </code></pre>
  
  <p>but when page is running (and element is still visible) it cant be located.</p>
  
  <p>Error log while trying to access it with webdriver</p>
  
  <pre><code>org.openqa.selenium.TimeoutException: Expected condition failed: waiting for element to be clickable: By.xpath: .//div/mat-spinner (tried for 10 second(s) with 500 milliseconds interval)
          at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:113)
          at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:283)
          at base.StaticSeleniumDriver.getWebElement(StaticSeleniumDriver.java:362)
          at steps.BaseSteps.debugDrawSpinner(BaseSteps.java:55)
          at ?.Given Debug draw spinner(Campus.feature:190)
        Caused by: org.openqa.selenium.NoSuchElementException: Cannot locate an element using By.xpath: .//div/mat-spinner
        For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
        Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
        System info: host: 'BANNB061', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
        Driver info: driver.version: StaticSeleniumDriver
  </code></pre>
  
  <p>Using following code:</p>
  
  <pre><code>WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds);
  return wait.until(ExpectedConditions.elementToBeClickable(By.xpath(xpath)));
  </code></pre>