UI Vision - SelectFrame Issue

On our homepage of https://www.lensabl.com/ we have a modal that pops up from a 3rd party via iFrame on first time visit only yet I am unable to continue the test after successfully closing the modal due to this error:

[error]: The selected frame has been removed. You may want to use another selectFrame before its removal.

Which I have tried following https://ui.vision/rpa/docs/selenium-ide/selectframe but still complains about the iFrame missing. Any suggestions and ideas are welcome.

Scenario:
Open site homepage incognito, need a fresh slate of cookies and then a first visit Modal will appear.

Current steps:

{
  "Name": "1_open_promo_bar",
  "CreationDate": "2021-4-7",
  "Commands": [
    {
      "Command": "verifyElementPresent",
      "Target": "xpath=//*[@id=\"attentive_overlay\"]",
      "Value": "Is overlay active"
    },
    {
      "Command": "if_v2",
      "Target": "${!statusOK}",
      "Value": "if Overlay Is Active, then close it"
    },
    {
      "Command": "selectFrame",
      "Target": "xpath=//iframe[@id='attentive_creative']",
      "Value": "Activate Frame"
    },
    {
      "Command": "click",
      "Target": "//*[@id='closeIconContainer']",
      "Value": "Close Overlay"
    },
    {
      "Command": "end",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "assertElementPresent",
      "Target": "xpath=//div[@class=\"promo-bar row\"]",
      "Value": "Assert Promo Bar Appears"
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@class=\"a-center promo-top-container\"]/span",
      "Value": ""
    },
    {
      "Command": "assertElementPresent",
      "Target": "xpath=//*[@id=\"myModal\"]/div/a/picture/img",
      "Value": "//Check that the image element exists"
    },
    {
      "Command": "assertElementPresent",
      "Target": "xpath=//*[@id=\"myModal\"][contains(@style, 'display: block')]",
      "Value": "// Validates Modal Opened"
    },
    {
      "Command": "click",
      "Target": "id=modal-close",
      "Value": ""
    },
    {
      "Command": "assertElementPresent",
      "Target": "xpath=//*[@id=\"myModal\"][contains(@style, 'display: none')]",
      "Value": "// Validates Modal Closed"
    }
  ]
}

I tested your macro and all seems ok - or maybe I don’t understand the problem yet :wink:

My test:

First, thank you for trying it out. I forgot to include to open in incognito, need a fresh slate of cookies and then a first visit Modal will appear.

Any chance to take a look at this again?