title: The while loop inside the Python for loop is repeated only once
body: <p>This is a part of the code that checks the notice that appears while working using pyautogui and resumes the work when it disappears.</p>
  <p>Capture the guide and make it into an image, check it with pyautogui, and if it exists, move on to the next one.</p>
  <pre>
      number = 0
      for mark in sub_list:
          pyautogui.moveTo(1105, 356)
          pyautogui.click()
          time.sleep(random.uniform(0.5, 1.2))
          pyautogui.moveTo(291, 529)
          pyautogui.click()
          time.sleep(random.uniform(0.5, 1.2))
          pyautogui.moveTo(190, 207)
          pyautogui.click()
          time.sleep(random.uniform(0.5, 1.2))
          pyautogui.moveTo(347, 529)
          pyautogui.click()
          pyautogui.write(sub_list[number])
          print(sub_list[number])
          time.sleep(random.uniform(0.5, 1.2))
          pyautogui.moveTo(702, 531)
          pyautogui.click()
      
          icon_to_click = "Recycle Bin"
      
          r = None
          while r is None:
              r = pyautogui.locateOnScreen('rb.png', grayscale=True)
          print(icon_to_click + ' now loaded')
      
          pyautogui.write(''.join(a_record))
          time.sleep(random.uniform(0.5, 1.2))
          pyautogui.moveTo(210, 616)
          pyautogui.click()
      
          tiu = str(sub_list[number]) + "." + str(main_domain)
          sub_domain.append(tiu)
          print(sub_domain[number])
          time.sleep(random.uniform(4, 5))
          number = number + 1
      </pre>
  <p>However, it works fine once, but from the second iteration it can't find the image and stops.</p>
  <pre><code>&lt;pre&gt;
      icon_to_click = &quot;Recycle Bin&quot;
  
      r = None
      while r is None:
          r = pyautogui.locateOnScreen('rb.png', grayscale=True)
      print(icon_to_click + ' now loaded')
  &lt;/pre&gt;
  </code></pre>
  <p>Should I change the settings in this part? Help</p>