# Unable to switchToWindowIndex on Safari browser on Browserstack

**URL:** <https://forum.katalon.com/t/unable-to-switchtowindowindex-on-safari-browser-on-browserstack/24224>\
**Category:** Mobile Testing\
**Tags:** mobile-testing, katalon-studio\
**Created:** [May 1, 2019, 2:49pm UTC](https://forum.katalon.com/t/unable-to-switchtowindowindex-on-safari-browser-on-browserstack/24224 "2019-05-01T14:49:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrei\_Zaharia](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@Andrei\_Zaharia](https://forum.katalon.com/u/Andrei_Zaharia)\
**Post date:** [May 1, 2019, 2:49pm UTC](https://forum.katalon.com/t/unable-to-switchtowindowindex-on-safari-browser-on-browserstack/24224/1 "2019-05-01T14:49:12Z")

</div>

Katalon version: 6.1.1  
Browserstack device: “os\_version”:“11.0”,“device”:“iPhone X”,“real\_mobile”:“true”

Hi,  
I’m running some tests on Browserstack on the above device, and my test fails because it cannot switch to the window with index 1. The same test works on other Os and browsers (e.g. Win 10 - chrome; Samsung Galaxy s8 - chrome, etc.). It seems that the issue is happening only on Safari browser (mobiles and desktop). I know that there are other switchToWindow possibilities, but switchToWindowIndex is the only one that suites my needs.

Did anyone else had this issue? Is there a fix for this?  
Thank you

This is the error I get when it cannot switch the window.

> Reason:  
> com.kms.katalon.core.exception.StepFailedException: Unable to switch to window with index: ‘1’  
> at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)  
> at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)  
> at com.kms.katalon.core.webui.keyword.builtin.SwitchToWindowIndexKeyword.switchToWindowIndex(SwitchToWindowIndexKeyword.groovy:85)  
> at com.kms.katalon.core.webui.keyword.builtin.SwitchToWindowIndexKeyword.execute(SwitchToWindowIndexKeyword.groovy:67)  
> at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)  
> at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.switchToWindowIndex(WebUiBuiltInKeywords.groovy:1861)  
> at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$switchToWindowIndex$13.call(Unknown Source)  
> at DefaultQuoteCTBResponsive.run(DefaultQuoteCTBResponsive:171)  
> 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:342)  
> at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:333)  
> at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:312)  
> at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:304)  
> at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:238)  
> at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)  
> at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)  
> at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)  
> at TempTestCase1556720979305.run(TempTestCase1556720979305.groovy:21)  
> Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)  
> Command duration or timeout: 0 milliseconds

---

<div class="post-metadata">

**Author:** ![dlobban](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dlobban/32/16103_2.png) [@dlobban](https://forum.katalon.com/u/dlobban)\
**Post date:** [December 16, 2021, 5:26am UTC](https://forum.katalon.com/t/unable-to-switchtowindowindex-on-safari-browser-on-browserstack/24224/2 "2021-12-16T05:26:37Z")

</div>

Hi @Andrei_Zaharia,

We are experiencing a similar issue, were you able to solve your issue?

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:30am UTC](https://forum.katalon.com/t/unable-to-switchtowindowindex-on-safari-browser-on-browserstack/24224/3 "2022-08-08T07:30:07Z")

</div>


