会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 133776个问题

老师你好,运行python代码请求appium的时候报错,请问这是哪里出现的问题,Appium-Python-Client版本也是2.6.1

from time import sleep
from appium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC


desired_caps = {
        "platformName": "Android",  # 操作系统
        "platformVersion": "9",  # 设备版本号
        "deviceName": "Redmi 6A",  # 设备 ID
        "appPackage": "com.android.browser",  # app 包名
        "appActivity": "com.android.browser.BrowserActivity"  # app 启动时主 Activity
    }

# 设置appium的服务地址
server = 'http://localhost:4723/wd/hub'
# 创建一个模拟器
driver = webdriver.Remote(command_executor=server, desired_capabilities=desired_caps)
# 创建一个全局等待对象
print(driver)

E:\python_virtual_env\py_demo_all_env\Scripts\python.exe E:/python_project_pycahrm/demo_git_project/demo_project/all_test/shouji_apk/apk_1.py
Traceback (most recent call last):
  File "E:/python_project_pycahrm/demo_git_project/demo_project/all_test/shouji_apk/apk_1.py", line 19, in <module>
    driver = webdriver.Remote(command_executor=server, desired_capabilities=desired_caps)
  File "E:\python_virtual_env\py_demo_all_env\lib\site-packages\appium\webdriver\webdriver.py", line 230, in __init__
    super().__init__(
TypeError: __init__() got an unexpected keyword argument 'desired_capabilities'

Process finished with exit code 1

图片.png

Python 全系列/第十六阶段:Python 爬虫开发/移动端爬虫 2086楼
Python 全系列/第八阶段:轻量级Web开发利器-Flask框架/Flask数据库 2087楼
Python 全系列/第四阶段:函数式编程和核心特性/函数式编程核心(高阶函数、闭包等) 2090楼
Python 全系列/第四阶段:函数式编程和核心特性/内存管理 2091楼
JAVA 全系列/第十一阶段:百战旅游网项目/百战旅游网 2092楼
JAVA 全系列/第六阶段:JavaWeb开发/JSP技术详解 2093楼
Python 全系列/第四阶段:函数式编程和核心特性/内存管理 2094楼
Python 全系列/第四阶段:函数式编程和核心特性/内存管理 2095楼
Python 全系列/第四阶段:函数式编程和核心特性/内存管理 2096楼
Python 全系列/第二十一阶段:数据分析-统计分析/抽样分布 2097楼
Python 全系列/第二十一阶段:数据分析-统计分析/抽样分布 2098楼

vue引入路由配置.zip

image.pngimage.png我的代码只显示那两个跳转配置,不显示HomeView和AboutView里的代码,我认为应该是在导入的地方有问题但是没找到,麻烦老师帮我看看

Python 全系列/第十阶段:前端进阶-高效开发Vue框架/Vue3 2099楼

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .phone {
        width: 1300px;
        height: 680px;
        margin: 0 auto;
        background-color: bisque;
    }

    .left {
        width: 234px;
        height: 680px;
        background-color: rgb(236, 41, 7);
    }

    .right {
        float: right;
        width: 1050;
        height: 680px;
        background-color: aliceblue;
    }

    .box {
        float: left;
        width: 250px;
        height: 300px;
        background-color: black;
        margin-top: 10px;
        margin-left: 10px;
    }
</style>

<body>
    <div class="phone">
        <div class="left"></div>
        <div class="right">
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
        </div>
    </div>
</body>

</html>

老師,我的網頁加載后right裏面内容都向下排列了

WEB前端全系列/第一阶段:HTML5+CSS3模块/表单 2100楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637