Switch to webview timeout after 240000ms - unable to test webview on Android

Katalon Studio Free v10.1.0
Framework cucumber
Appium 2.15.0
Android emulator API 35 and chrome version 128
Chromedriver 128.0.6613.84

Capabilities:
appPackage
noReset true
chromedriverPort
appWaitActivity
uiautomator2ServerlaunchTimeout 60s
deviceName
fullReset false
appActivity
newCommandTimeout
platformVersion
automationName uiautomator2
autoGrantPermissions true
forceAppLaunch
platformName
shouldTerminateApp true

Code extract:
<Set contextNames = ((SupportsContextSwitching) driver).getContextHandles()
for (String contextName : contextNames) {
System.out.println(contextName)
}

			Mobile.comment("Switch to Webview")
		
			((SupportsContextSwitching) driver).context(contextNames.toArray()[1])

/>
Error:
Set chromedriver binary as: C:\Users\username.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe
No old chromedrivers seem to exist
Spawning chromedriver with: C:\Users\username.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe --port=63085 --adb-port=5037 --verbose
Set ChromeDriver communication protocol to W3C
connect ECONNREFUSED 127.0.0.1:63085
Starting W3C Chromedriver session with capabilities: {
“capabilities”: {
“alwaysMatch”: {
“goog:chromeOptions”: {
“androidPackage”: “com.app.online.env”,
“androidUseRunningApp”: true,
“androidProcess”: “com.app.online.env”,
“androidDeviceSerial”: “emulator-5554”
},
“goog:loggingPrefs”: {
“browser”: “ALL”
}
}
}
}

2nd issue: 1 out of 2 times, we are having Failed to start appium in 30 seconds.

1 Like

Hi @mushiirah.etwarooah,

Welcome to our community. Please help follow this instruction: Fail to start Appium server in 30 seconds | Katalon Docs. and let me know if it does not work. Thank you

looks like connection is not going through

Hello Elly,
Even if i change the timeout, it sometimes start appium and sometimes give me the error Failed to start appium in 60 seconds. And 60 seconds as default timeout make my execution time increase a lot…

1 Like

Hi @mushiirah.etwarooah,

If it does not work for you, can you please follow this discussion and try: How do I solve the "Fail to start Appium server in 60 seconds" error?? Thank you

Hello Elly,
In the solution you sent me, they used Appium 1.22.0 to solve the issue but i cant use this version of Appium with KS free v10.1.0 right? Im using Appium 2.15.0. Is it an issue with Katalon?

Hello Dinesh,
Any idea how to solve this connection issue?

Hi @mushiirah.etwarooah,

As you are using v10.1.0, the compatible version is appium 2.11.1. Read more on our Release Note: Katalon Studio Release Notes: Version 10.x | Katalon Docs. Thank you

Hi @mushiirah.etwarooah,

Can you please try with Appium 2.11.1 and let us know if it helps? Thank you

can you whitelist by working with your network team

Still same error with appium 2.11.1 :frowning: