How switch to pop up without title

Hey friends.
I have pop up without title and I need switch to this pop up (I want click on the button in pop up).

So, I know there exists three options:
Switch To Window Title/URL/INDEX => but in my case there no Title and no URL and no Index >> so, what I should to do?

Thanks

1 Like

Did you try to get a pathway to the “press button” object and if you did, were you successful? If so, perhaps:

WebUI.switchToWindowIndex('1')

WebUI.waitForElementVisible(findTestObject(...), 10)
WebUI.click(findTestObject(...))

If you were not successful in getting a pathway, can you try to right click on the button and select “Inspect”. Right click on the button and select “Inspect” a second time. The HTML of the object should be exposed and you, or we if you can share it, can get a pathway to the object.
If you do not get a pop-up with “Inspect” on it when you right click, then try and press F12 and then choose, “Open DevTools”. Choose the first icon that allows you to inspect the HTML of the button to determine a pathway to it.

I solved a problem :slight_smile:
Just changed xpath for the button locator in pop up!

Thanks for your answer, but

WebUI.switchToWindowIndex('1')

not helps since it’s not new window - there only one window (small window inside big window)…

Hi,

Could you please share how you change your XPath so that others can learn from it? Thank you