This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Failed to establish a new connection with UFT Mobile Server using Appium and python

I use python and appium to connect UFTM server, a error pop up with the message 

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x000001A5AED2C648>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

When I use appium inspector to connect the device, it succeed. But using python and appium to connect it, it always failed to connect.

Followings are wo code, which parts I missed?

from appium import webdriver

desired_caps = {
'platformName': 'Android',
'platformVersion': '10',
'deviceName': 'Galaxy S10',
'appPackage': 'com.foreverht.workplus.hcbmpre',
'appActivity': 'com.foreveross.atwork.modules.main.activity.SplashActivity',
'unicodeKeyboard': True,
'resetKeyboard': True,
'noReset': True,
'newCommandTimeout': 6000,
'automationName': 'UiAutomator2',
'oauthClientId': 'oauth2-xxxxxx@microfocus.com',
'oauthClientSecret': 'xxxxxxxx',
'tenantId': '999999999'
}

driver = webdriver.Remote(r'https://xxxx:443/wd/hub', desired_caps)
# xxxx:443 is the UFT Mobile Server URL

print('create driver session successfully')

driver.quit()
Parents Reply Children
No Data