# When switching to window index 2, katalon is failing to make any click on the screen

**URL:** <https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [December 11, 2019, 2:54pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399 "2019-12-11T14:54:20Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![mariana.kolko](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@mariana.kolko](https://forum.katalon.com/u/mariana.kolko)\
**Post date:** [December 11, 2019, 2:54pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/1 "2019-12-11T14:54:20Z")

</div>

i’m trying to automate dynamics 365, and i have succeeded in doing so, but after finishing the processes, i was asked to search for the created cases from the advanced find. and here where my problem began. i did a query to find the intended case, but when i click on the case from the results of the advanced find, i have added switch to window index 2, then maximize the window, till now everything is fine, but after the maximize window, katalon is failing to make any click on the screen. any help?

---

<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:** [December 11, 2019, 3:16pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/2 "2019-12-11T15:16:11Z")

</div>

Do you see any errors?

What happens if you remove the maximize window?

---

<div class="post-metadata">

**Author:** ![mariana.kolko](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@mariana.kolko](https://forum.katalon.com/u/mariana.kolko)\
**Post date:** [December 11, 2019, 3:20pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/3 "2019-12-11T15:20:43Z")

</div>

no there is no error, katalon just move to the next step, and nothing happens on the screen. i don’t think the problem is from maximizing the window, because i did remove the maximize window and nothing changed

---

<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:** [December 11, 2019, 3:22pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/4 "2019-12-11T15:22:03Z")

</div>

Are you certain about window index 2?

Try 1.

---

<div class="post-metadata">

**Author:** ![mariana.kolko](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@mariana.kolko](https://forum.katalon.com/u/mariana.kolko)\
**Post date:** [December 11, 2019, 3:22pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/5 "2019-12-11T15:22:50Z")

</div>

i tried index 1, the focus went to the advanced find screen and not the opened case.

---

<div class="post-metadata">

**Author:** ![mariana.kolko](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@mariana.kolko](https://forum.katalon.com/u/mariana.kolko)\
**Post date:** [December 11, 2019, 3:24pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/6 "2019-12-11T15:24:35Z")

</div>

i did something, close windows index 0 (which is CRM main page), which made the advanced find window index 0 now and then i did switch to windows index 1 (the window of the case), but still no luck, katalon is not able to make any click on the screen

---

<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:** [December 11, 2019, 3:27pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/7 "2019-12-11T15:27:02Z")

</div>

> [@mariana.kolko](#):
>
> i did something, close windows index 0 (which is CRM main page), which made the advanced find window index 0 now and then…

I would avoid doing that.

Did you try `WebUI.switchToWindowTitle()`

---

<div class="post-metadata">

**Author:** ![mariana.kolko](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@mariana.kolko](https://forum.katalon.com/u/mariana.kolko)\
**Post date:** [December 11, 2019, 3:29pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/8 "2019-12-11T15:29:15Z")

</div>

yes i did try the switch to window title, but katalon failed to specify which window to go to. and i tried switch to window URL as well, but also no luck

---

<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:** [December 11, 2019, 3:30pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/9 "2019-12-11T15:30:00Z")

</div>

Show me a screenshot and mark the three windows so I can see what is going on.

---

<div class="post-metadata">

**Author:** ![mariana.kolko](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@mariana.kolko](https://forum.katalon.com/u/mariana.kolko)\
**Post date:** [December 11, 2019, 3:36pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/10 "2019-12-11T15:36:59Z")

</div>

![image](https://europe1.discourse-cdn.com/katalon/original/2X/7/75f609d1cf94d5a4ddbffd70fd7a3a34f52aa6a6.png)  
the first one is the CRM main page, the second one is the advanced find and the third one is the case window

---

<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:** [December 11, 2019, 3:44pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/11 "2019-12-11T15:44:34Z")

</div>

> [@mariana.kolko](#):
>
> but katalon failed to specify which to window to go to

Katalon doesn’t specify which window, you do that in your test case.

---

<div class="post-metadata">

**Author:** ![mariana.kolko](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@mariana.kolko](https://forum.katalon.com/u/mariana.kolko)\
**Post date:** [December 11, 2019, 3:48pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/12 "2019-12-11T15:48:04Z")

</div>

i don’t specify the window, but when i put switch to window title, the 3 windows become flickering and no window was chosen, as if Katalon didn’t know what window to choose

---

<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:** [December 11, 2019, 3:49pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/13 "2019-12-11T15:49:40Z")

</div>

Do you think it might be a timing issue? Make sure you wait long enough for the window to appear _and_ load its content.

---

<div class="post-metadata">

**Author:** ![mariana.kolko](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@mariana.kolko](https://forum.katalon.com/u/mariana.kolko)\
**Post date:** [December 11, 2019, 3:50pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/14 "2019-12-11T15:50:01Z")

</div>

i did add delay 3, and the page was actually loaded

---

<div class="post-metadata">

**Author:** ![mariana.kolko](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@mariana.kolko](https://forum.katalon.com/u/mariana.kolko)\
**Post date:** [December 13, 2019, 9:05am UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/15 "2019-12-13T09:05:14Z")

</div>

the issue was solved, i had to do some changes in the iFrame, issue was detected with the Spy object

---

<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:** [December 13, 2019, 1:02pm UTC](https://forum.katalon.com/t/when-switching-to-window-index-2-katalon-is-failing-to-make-any-click-on-the-screen/37399/16 "2019-12-13T13:02:53Z")

</div>

Closed on December 13, 2019, 1:02pm UTC


