import time
import unittest
from appium.webdriver.webdriver import WebDriver as AppiumDriver
from appium import webdriver
desired_caps = dict(
platformName='Android',
deviceName='Android Emulator',
app=('C:/Users/Asus/Desktop/h.a/asan.apk')
)
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
i recieved this error: appium-python
i got this message:
how can i fix it?
am using appium and android studio emulator to simulate and automation test of android application.
Traceback (most recent call last):
File "C:\Users\Asus\workspace\top web\complete.py", line 19, in <module>
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python39\lib\site-packages\appium\webdriver\webdriver.py", line 151, in __init__
super().__init__(
File "C:\Users\Asus\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 268, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python39\lib\site-packages\appium\webdriver\webdriver.py", line 229, in start_session
self.capabilities = response.get('value')
AttributeError: can't set attribute
I had this same issue and it got fixed by re-installing appium with python instead of npm.
I installed appium from source https://github.com/appium/python-client
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.