Comments (5)
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.
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 = height0.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 = height0.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.
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.
遇到同样问题
from python-client.
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
from python-client.
Related Issues (20)
- Can appium use proxies HOT 1
- Appium driver's terminate_app method throwing NotYetImplementedError HOT 1
- selenium.common.exceptions.WebDriverException: Message: The requested resource could not be found, or a request was received using an HTTP method that is not supported HOT 8
- Will it support asyncio?
- how to use appium:settings[snapshotMaxDepth] in new appium client 3 ? HOT 2
- UiAutomator2Options has no option to set wait_for_idle_timeout HOT 2
- ActionHelpers extenstion 'Drag and Drop' implementation problem HOT 3
- MultiAction.add() Incorrect Docstring HOT 2
- What is the alternative for MultiAction on v3? HOT 2
- ResourceWarning: unclosed file <_io.BufferedReader name HOT 2
- Error initializing the driver: Message: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource HOT 1
- bug: 'InvalidElementStateException: Message: Unable to perform W3C actions [Android Emulator] HOT 9
- Facing Touch_Actions issue after V4.0.0 changes HOT 1
- Appium python Client - Set_Network_connection(1) toggling airplane mode not working HOT 1
- Getting a strange Python error which fails the entire suite: binascii.Error: Incorrect padding HOT 2
- Need to change the orientation of app which is dependent on sensor HOT 7
- AttributeError: 'NoneType' object has no attribute 'to_capabilities' HOT 11
- How TouchAction to W3C actions implement partial refresh HOT 4
- The last error was: Keyword 'Swipe By Percent' failed after retrying for 10 seconds. The last error was: AttributeError: 'WebDriver' object has no attribute 'desired_capabilities'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-client.