# Handling popup window

**URL:** <https://forum.katalon.com/t/handling-popup-window/80732>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [November 18, 2022, 9:11am UTC](https://forum.katalon.com/t/handling-popup-window/80732 "2022-11-18T09:11:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![voiceengineering](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/voiceengineering/32/20464_2.png) [@voiceengineering](https://forum.katalon.com/u/voiceengineering)\
**Post date:** [November 18, 2022, 9:11am UTC](https://forum.katalon.com/t/handling-popup-window/80732/1 "2022-11-18T09:11:37Z")

</div>

Hello Everyone,

I need your help on something I have tried to solve by following Katalon Studio documentations and posts here in the community.  
The most similar post was the following which I tried to implement solving my issue:

> **[How to take the screenshots of Javascript alert](https://forum.katalon.com/t/how-to-take-the-screenshots-of-javascript-alert/12179/10)**
>
> Russ Thomas said: Did you try something like this? WebUI.waitForAlert(10) WebUI.takeScreenshot() WebUI.acceptAlert() Your problem might be that the call to JavaScript returns immediately (before the alert appears) and the code running...

I have tried at the beginning to follow the following documentation, but it seems what I have is not an alert type:  
[Solving Pop-up dialog issue with Katalon Studio | Katalon Docs](https://docs.katalon.com/docs/author/keywords/using-keywords-in-katalon-studio/web-testing/solving-pop-up-dialog-issue-with-katalon-studio)

Now the issue is that I want with automated testing, to do accept this alert/pop-out windows, but I don’t know how.  
This is a screenshot in which I mask the website address:

 ![Pop-out](https://europe1.discourse-cdn.com/katalon/original/3X/b/c/bcb58d2811ed288467ebd65f5e35919521e783f4.jpeg)

This is what I tired currently and seems also that it cannot capture the screenshot:

 ![code](https://europe1.discourse-cdn.com/katalon/original/3X/e/8/e8cda11316b9b62ac7f9e400ee8c2b7689aadd3d.jpeg)

The KS Console failed test output:

2022-11-18 09:19:44.371 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------  
2022-11-18 09:19:44.374 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/Login TP Acceptance - Chrome  
2022-11-18 09:19:44.714 INFO c.k.katalon.core.main.TestCaseExecutor - (Default) variable =  
2022-11-18 09:19:45.288 DEBUG testcase.Login TP Acceptance - Chrome - 1: openBrowser(“[https://AWEBSITE.com](https://AWEBSITE.com)”)  
2022-11-18 09:19:45.637 INFO c.k.k.core.webui.driver.DriverFactory - Starting ‘Chrome’ driver  
nov 18, 2022 9:19:45 AM org.openqa.selenium.remote.DesiredCapabilities chrome  
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`  
2022-11-18 09:19:45.687 INFO c.k.k.core.webui.driver.DriverFactory - Action delay is set to 0 milliseconds  
Starting ChromeDriver 107.0.5304.62 (1eec40d3a5764881c92085aaee66d25075c159aa-refs/branch-heads/5304@{#942}) on port 30392  
Only local connections are allowed.  
Please see [Security considerations &nbsp;|&nbsp; ChromeDriver &nbsp;|&nbsp; Chrome for Developers](https://chromedriver.chromium.org/security-considerations) for suggestions on keeping ChromeDriver safe.  
ChromeDriver was started successfully.  
nov 18, 2022 9:19:47 AM org.openqa.selenium.remote.ProtocolHandshake createSession  
INFO: Detected dialect: W3C  
2022-11-18 09:19:47.802 INFO c.k.k.core.webui.driver.DriverFactory - sessionId = 6b6aa97ecefe80c24f678784d972a7ae  
2022-11-18 09:19:47.822 INFO c.k.k.core.webui.driver.DriverFactory - browser = Chrome 107.0.0.0  
2022-11-18 09:19:47.823 INFO c.k.k.core.webui.driver.DriverFactory - platform = Windows 10  
2022-11-18 09:19:47.823 INFO c.k.k.core.webui.driver.DriverFactory - seleniumVersion = 3.141.59  
2022-11-18 09:19:47.824 INFO c.k.k.core.webui.driver.DriverFactory - proxyInformation = ProxyInformation { proxyOption=NO\_PROXY, proxyServerType=HTTP, username=, password=\*\*\*\*\*\*\*\*, proxyServerAddress=, proxyServerPort=0, executionList=“”, isApplyToDesiredCapabilities=true }  
2022-11-18 09:19:50.742 DEBUG testcase.Login TP Acceptance - Chrome - 2: maximizeWindow()  
2022-11-18 09:19:50.912 DEBUG testcase.Login TP Acceptance - Chrome - 3: waitForAlert(10)  
2022-11-18 09:20:01.260 WARN c.k.k.c.w.k.builtin.WaitForAlertKeyword - No alert found after 10 second(s).  
2022-11-18 09:20:01.261 DEBUG testcase.Login TP Acceptance - Chrome - 4: path = takeScreenshot()  
2022-11-18 09:20:01.867 DEBUG testcase.Login TP Acceptance - Chrome - 5: of(the).screenshot(’)  
2022-11-18 09:20:01.873 ERROR c.k.katalon.core.main.TestCaseExecutor - ❌ Test Cases/Login TP Acceptance - Chrome FAILED.  
Reason:  
groovy.lang.MissingPropertyException: No such property: line for class: Script1668691752286  
at Login TP Acceptance - Chrome.run(Login TP Acceptance - Chrome:33)  
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)  
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)  
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)  
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)  
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)  
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)  
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)  
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:142)  
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:133)  
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)  
at TempTestCase1668759581345.run(TempTestCase1668759581345.groovy:25)

2022-11-18 09:20:01.879 ERROR c.k.katalon.core.main.TestCaseExecutor - ❌ Test Cases/Login TP Acceptance - Chrome FAILED.  
Reason:  
groovy.lang.MissingPropertyException: No such property: line for class: Script1668691752286  
at Login TP Acceptance - Chrome.run(Login TP Acceptance - Chrome:33)  
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)  
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)  
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)  
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)  
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)  
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)  
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)  
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:142)  
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:133)  
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)  
at TempTestCase1668759581345.run(TempTestCase1668759581345.groovy:25)

2022-11-18 09:20:01.897 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/Login TP Acceptance - Chrome

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [November 18, 2022, 4:27pm UTC](https://forum.katalon.com/t/handling-popup-window/80732/2 "2022-11-18T16:27:59Z")

</div>

That is not an alert issued by the AUT, it’s a security feature of the browser.

There maybe a custom setting to always accept/approve that dialog in Chrome’s Desired Capabilities but I’m not an expert on Chrome.

You might try look at the following post for guidance and also search the web for mentions of the dialog text.

> [@Desired Capabilities - The Missing Manual](http://forum.katalon.com/t/desired-capabilities-the-missing-manual/20748):
>
> One of the biggest hurdles with using Katalon/Webdriver is setting the appropriate Desired Capabilities that configure various browser settings programmatically. There are a couple of reasons for this: 1.) Browsers do not expose these back-end properties in the settings menu. Instead, they offer a user-friendly GUI for configuring settings that are based on these properties. This of course makes sense for 99.9999% of browser users, but isn’t helpful for us. 2.) The appropriate Desired Capabili…

---

<div class="post-metadata">

**Author:** ![voiceengineering](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/voiceengineering/32/20464_2.png) [@voiceengineering](https://forum.katalon.com/u/voiceengineering)\
**Post date:** [November 23, 2022, 2:16pm UTC](https://forum.katalon.com/t/handling-popup-window/80732/3 "2022-11-23T14:16:19Z")

</div>

Hello Russ,

Thank you for your feedback. I had a feeling it is not normal alert.  
I have tried to follow the article you shared but the parameter is behaving differently for me in chrome:

 ![Prefrences](https://europe1.discourse-cdn.com/katalon/original/3X/5/8/58514f85a4df759b1633457c547e6bb2a30be1a1.jpeg)  
As you can see in the Preferences, I cannot see anything special added in the file (after clicking on Ops ClientApplicaitonStarter).

I will try to look further in the web about Chrome approve/accept dialog and I hope to find a sloution.

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![pdosapati](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/pdosapati/32/23869_2.png) [@pdosapati](https://forum.katalon.com/u/pdosapati)\
**Post date:** [December 2, 2024, 2:16pm UTC](https://forum.katalon.com/t/handling-popup-window/80732/4 "2024-12-02T14:16:25Z")

</div>

How to handle this kind of popup in application?

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [December 2, 2024, 9:11pm UTC](https://forum.katalon.com/t/handling-popup-window/80732/5 "2024-12-02T21:11:01Z")

</div>

You will likely have to give more information on what is your actual pop-up, however, you can do some reading about “Desired Capabilities” and see if one of them is useful.

> **[Set up Desired Capabilities for WebUI Testing in Katalon Studio | Katalon Docs](https://docs.katalon.com/katalon-studio/manage-projects/project-settings/desired-capabilities/set-up-desired-capabilities-for-webui-testing-in-katalon-studio)**
>
> Katalon Studio allows you to define desired capabilities for local execution with Chrome, Firefox, Internet Explorer (IE), Safari, Edge or Edge (Chromium) in Project \> Settings \> Desired Capabilities \> WebUI \> ...

[http://forum.katalon.com/search?q=desired%20capabilities](http://forum.katalon.com/search?q=desired%20capabilities)
