How to Use SelectWindow for Newly Opened PopUp Window

I’m aware that selectwindow command selectWindow, select Window - Selenium IDE Commands Tutorial can select any window and using tab= or title= we can select any tab / window.

But is it possible to select newly opened popup window after clicking a link? I want it to fill login form which appear in new popup window after user clicking “login” link. Or at least using regex in title= so ui.vision rpa can fill in proper form.

Here’s my code:

{
“Name”: “Open URL from CSV”,
“CreationDate”: “2021-8-19”,
“Commands”: [
{
“Command”: “csvReadArray”,
“Target”: “comment-auto-approve-footprint-comment-as-login.csv”,
“Value”: “myCSV”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Number of rows = ${!CsvReadMaxRow}”,
“Value”: “green”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return ${mycsv[0]}.length;”,
“Value”: “col”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Number of columns = ${col}”,
“Value”: “pink”,
“Description”: “”
},
{
“Command”: “comment”,
“Target”: “loop over all CSV values in the array”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “forEach”,
“Target”: “myCSV”,
“Value”: “row”,
“Description”: “With each loop, we copy a new arraw ROW into the ${row[0] variable”
},
{
“Command”: “echo”,
“Target”: “url is ${row[0]}”,
“Value”: “brown”,
“Description”: “”
},
{
“Command”: “open”,
“Target”: “${row[0]}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “linkText=login”,
“Value”: “”,
“Targets”: [
“linkText=login”,
“id=blog_post_comment_new_author_change”,
“xpath=//[@id=“blog_post_comment_new_author_change”]",
“xpath=//a[@id=‘blog_post_comment_new_author_change’]”,
“xpath=//form/div/div/a”,
“css=#blog_post_comment_new_author_change”
],
“Description”: “”
},
{
“Command”: “selectWindow”,
“Target”: “title=sitename.com/blog/aurora”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “name=email”,
“Value”: “myemail@gmail.com”,
“Targets”: [
“name=email”,
"xpath=//
[@id=“aurora_form”]/div/input”,
“xpath=//input[@name=‘email’]”,
“xpath=//input”,
“css=#aurora_form > div:nth-child(1) > input”
],
“Description”: “”
},
{
“Command”: “type”,
“Target”: “name=password”,
“Value”: “Password123”,
“Targets”: [
“name=password”,
“xpath=//[@id=“aurora_form”]/div[2]/input",
“xpath=//input[@name=‘password’]”,
“xpath=//div[2]/input”,
“css=#aurora_form > div:nth-child(2) > input”
],
“Description”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “id=aurora_login”,
“Value”: “”,
“Targets”: [
“id=aurora_login”,
“name=login”,
"xpath=//
[@id=“aurora_login”]”,
“xpath=//input[@id=‘aurora_login’]”,
“xpath=//label/input”,
“css=#aurora_login”
],
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}

At selectWindow title=sitename.com/blog/aurora i want sitename.com to be regex or at least ui vision rpa to automatically select newly opened popup window. Can anyone help me with this? Thank you.