Giter Site home page Giter Site logo

Comments (5)

KazuCocoa avatar KazuCocoa commented on August 21, 2024

Please attach the full appium log and the python client's create session log as well? I guess you ran the test script/appium on local Appium server, but to check more contexts.

from python-client.

hyytest avatar hyytest commented on August 21, 2024

Please attach the full appium log and the python client's create session log as well? I guess you ran the test script/appium on local Appium server, but to check more contexts.

from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from appium.options.android import UiAutomator2Options
import time

def swipeUp(driver,n = 3):
x1 = width0.5
y1 = height
0.8
y2 = height*0.25
time.sleep(3)
for i in range(n):
time.sleep(3)
driver.swipe(x1, y1, x1, y2)

def swipeDown(driver,n = 5):
x1 = width0.5
y1 = height
0.26
y2 = height*0.9
time.sleep(3)
for i in range(n):
time.sleep(3)
driver.swipe(x1, y1, x1, y2)

capabilities = dict(
platformName= "Android",
platformVersion= "6",
deviceName= "hyy",
appPackage= "com.android.chrome",
appActivity= "org.chromium.chrome.browser.ChromeTabbedActivity",
adbExecTimeout=30000,
noReset= True,
)

appium_server_url = 'http://localhost:4723/wd/hub'
for i in range (1,3):
time.sleep(3)
capabilities_options = UiAutomator2Options().load_capabilities(capabilities)
driver = webdriver.Remote(command_executor=appium_server_url, options=capabilities_options)
size = driver.get_window_size()
print(size)
driver.get("https://youtube.com/")#There will be an error after executing this
width = size['width']
height = size['height']
time.sleep(3)
swipeUp(driver,2)
time.sleep(3)
driver.quit()

from python-client.

hyytest avatar hyytest commented on August 21, 2024

Please attach the full appium log and the python client's create session log as well? I guess you ran the test script/appium on local Appium server, but to check more contexts.
Traceback (most recent call last):
File "D:\Python39\lib\site-packages\IPython\core\interactiveshell.py", line 3369, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in <cell line: 1>
runfile('E:/python/pythonProject/reptile/spider/app.py', wdir='E:/python/pythonProject/reptile/spider')
File "D:\PyCharm 2021.3.3\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "D:\PyCharm 2021.3.3\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:/python/pythonProject/reptile/spider/app.py", line 148, in
driver.get("https://youtube.com/")
File "D:\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 357, in get
self.execute(Command.GET, {"url": url})
File "D:\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 348, in execute
self.error_handler.check_response(response)
File "D:\Python39\lib\site-packages\appium\webdriver\errorhandler.py", line 125, in check_response
raise exception_class(msg=message, stacktrace=format_stacktrace(stacktrace))
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Error attempting to start URI. Original error: Error: Error executing adbExec. Original error: 'Command 'D:\SDK\androidsdk\platform-tools\adb.exe -P 5037 -s FDGNW17113001644 shell am start -W -a android.intent.action.VIEW -d https://youtube.com/ com.android.chrome' timed out after 30000ms'. Try to increase the 30000ms adb execution timeout represented by 'adbExecTimeout' capability
Stacktrace:
UnknownError: An unknown server-side error occurred while processing the command. Original error: Error attempting to start URI. Original error: Error: Error executing adbExec. Original error: 'Command 'D:\SDK\androidsdk\platform-tools\adb.exe -P 5037 -s FDGNW17113001644 shell am start -W -a android.intent.action.VIEW -d https://youtube.com/ com.android.chrome' timed out after 30000ms'. Try to increase the 30000ms adb execution timeout represented by 'adbExecTimeout' capability
at getResponseForW3CError (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:388:37)

from python-client.

Ffmydy avatar Ffmydy commented on August 21, 2024

遇到同样问题

from python-client.

Ffmydy avatar Ffmydy commented on August 21, 2024

urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

from python-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.