Going crazy.... cant click a Close button on a message box dialog

Ive reached my wits end here, lol. Ive tried every single possible thing to simply close a dialog box that pops up after sharing some photos from our website. Ive even tried SendKeys(enter) but Katalon refuses to just send the keys - it needs an object to send them to but I dont want to specify an object. Cant it just send the keys without a target object? Ugh. The log keeps saying web element not found but if you use the verify Element and the spy tool or whatever it sees it fine.

I cant believe how hard this simple task is… c’mon…???

1 Like

hi Mike,

while browsing website our default focus is on website, but when any dialog box pop ups we have to shift out focus to new window.

use WebUI.switchToWindowIndex(1)

for 1st pop use index as 1, for 2nd use index as 2 and so on… you can handle many pop up using this.

thanks and regards,
sanket gharat.

1 Like

sanket gharat said:

hi Mike,

while browsing website our default focus is on website, but when any dialog box pop ups we have to shift out focus to new window.

use WebUI.switchToWindowIndex(1)

for 1st pop use index as 1, for 2nd use index as 2 and so on… you can handle many pop up using this.

thanks and regards,
sanket gharat.

Thanks - I actually did try this but interestingly this popup, while modal doesnt appear to be its own dialog or window. I tried to send the Window with Index(1) a Close command and that didnt work either. This is a tough one. Im scraping the bottom of the bucket here. It just doesnt make sense. Maybe Ill try it in Edge browser just to see if its a google chrome thing.

WebUI.acceptAlert() perhaps?

Just guessing here… but can’t do much more if you don’t share some more details. Like HTML of the page, screenshots, error message…

B)

Mate Mrse said:

WebUI.acceptAlert() perhaps?

Just guessing here… but can’t do much more if you don’t share some more details. Like HTML of the page, screenshots, error message…

B)

Tried that - log said no Alerts found. Ill try to get some screen shots and post back. Is there a way to just send a simple ENTER key without specifyting an object to send it to? Maybe using Java or whatever? Id think there has to be. That would solve the issue too.

OK - here are two screen shots. One is the website page with that pesky dialog that I cant deal with. Its title is “Share Picture Succeeded”. The Close button cannot be clicked. The other screenshot is the katalon screen and if you scroll down you’ll see that its getting mad about the window being gone or not found. I dunno. Makes no sense to me… ???

Katalon Screen.jpg

WebsiteScreen.jpg

Try this to simulate pressing the enter key:
http://forum.katalon.com/discussion/comment/12705/#Comment_12705

Can you also send some HTML? (right-click the dialog, then “Inspect”)

Mate Mrse said:

Can you also send some HTML? (right-click the dialog, then “Inspect”)

Phew… Im actually good. I used the Robot class key press code that was linked above. Damn! maybe not the most elegant solution but I dont care. It works. Thanks for the info!!! :slight_smile:

No problem!

I am having the same issue where i am not able to select the close button. This was working in a previous version of Katalon, so is it possible something changed? I am at a loss as to how to fix this issue.

1 Like

Having same issue, my popup is a JSP.
i tried with accept alert as well and cant switch to it (tried with URL and window title)

Any idea on how to fix it ? or handle it ? Thanks