title: selenium webdriver.Safari 'find_elements' method , does not find relevant elements when the Reader mode is been initially set for a specific domain
body: <p>instead, it's finding elements from the 'initial Html'.
  and not from the current 'Reader' mode html .</p>
  <h1>This The Sequence of Events:</h1>
  <p>setting an initial set that all of the pages that will be loaded from
  'swift.docs.org' will be displayed in 'Reader' mode
  <a href="https://i.stack.imgur.com/T18qx.png" rel="nofollow noreferrer">setting the Reader mode</a></p>
  <p>this is the script that i'm using in order to a url inside swift.docs.org :</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.by import By
  
  url = 'https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html'
  driver = webdriver.Safari()
  driver.get(url)
  page = driver.find_element(By.CLASS_NAME,'page')
  all_the_html_elements_in_side_the_page_element = page.find_elements(By.XPATH,'*') 
  length_of_the_list = len(all_the_html_elements_in_side_the_page_element)
  print('the length of the list is  ', length_of_the_list )
  for page_element in all_the_html_elements_in_side_the_page_element:
      print(page_element)
  </code></pre>
  <p>now in the 'regular' html there also a class that named 'page',
  and it look like this :</p>
  <p><a href="https://i.stack.imgur.com/7ywZo.png" rel="nofollow noreferrer">initial html page element image</a></p>
  <p>as you can see, the page class element is containing two web elements.</p>
  <p>the 'Reader' html source code has also an element that has a class named 'page'
  you can see it here :
  <a href="https://i.stack.imgur.com/6UtyD.png" rel="nofollow noreferrer">reader html page element image</a></p>
  <p>and as you can see the element that is class named is 'page' on the 'Reader' html
  has more then 2 elements (it's 22 elements to be precise)</p>
  <p>so the following peace of code from the script above</p>
  <pre><code>all_the_html_elements_in_side_the_page_element = page.find_elements(By.XPATH,'*') 
  length_of_the_list = len(all_the_html_elements_in_side_the_page_element)
  </code></pre>
  <p>should print :</p>
  <pre><code>the length of the list is   22
  </code></pre>
  <p>but instead it's printing
  the length of the list is   2</p>
  <p>also when creating a breaking point inside the for-in loop :</p>
  <pre><code>for page_element in all_the_html_elements_in_side_the_page_element:
      print(page_element) # &lt;------ breaking point 
  </code></pre>
  <p>and then running the script in order to inspect the 'page_element'.  i saw that the tag name  of the web element is named 'menu' ,
  just like in the 'regular' html source :</p>
  <pre><code>&lt;article class=&quot;page&quot;&gt;
  &lt;menu id=&quot;bashful&quot; type=&quot;toolbar&quot;&gt;…&lt;/menu&gt;
  &lt;div class=&quot;section&quot; id=&quot;the-basics&quot;&gt;…&lt;/div&gt;
  </code></pre>
  <h1>so now for the question :</h1>
  <p>is there a way that the driver will be referring to the 'true html' elements that are currently presented?, why does it doesn't load the the current html elements that
  the web element inspector is showing?</p>
  <p>I've tried to use <code>driver.refresh()</code> to fix it , but that did not work</p>