I have first page with one ID:

```
['schwarz', 'rosa']
id  = "schwarz"
<selenium.webdriver.firefox.webelement.FirefoxWebElement (session="d5e1e51e-620d-44c8-9508-d79aed865922", element="feb91d78-fc5a-44c6-90ba-0a233d97f8fd")>

```

I have second page with another ID:

```
['schwarz', 'rosa']
id = "rosa"
<selenium.webdriver.firefox.webelement.FirefoxWebElement (session="d5e1e51e-620d-44c8-9508-d79aed865922", element="ef190e76-c1c1-432a-8ee7-2ece61f71923")>

```

selenium works great on first page, but on next page I have this error

```
Traceback (most recent call last):
  File "C:\Users\1\l.py", line 223, in <module>
    actions.move_to_element(colourinput).click().perform()
  File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\common\action_chains.py", line 80, in perform
    self.w3c_actions.perform()
  File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\common\actions\action_builder.py", line 76, in perform
    self.driver.execute(Command.W3C_ACTIONS, enc)
  File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\1\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.StaleElementReferenceException: Message: The element reference of <input **id="schwarz"** class="product-variants__input" name="attributeSet" type="radio"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed

```

Is it trying to use previous id? I'm erasing id *del id* before using next id but t doesn't work.

```
for i in range(len(coloursarray)):
                    del colourid
                    colourid = coloursarray[i]
                    if colourid != '':
                        colourinput = driver.find_element_by_id(colourid)
                        time.sleep(0.5)
                        actions.move_to_element(colourinput).click().perform()```

```