雨停江南Lujier 2019-12-26 12:56
浏览 1286

App自动化报错:Proxy error: Could not proxy command to remote server. Original error: 404 - undefined

    App启动参数如下(存放在Yaml文件中):

automationName: UiAutomator2
platformName: Android
platformVersion:  7
deviceName: Android Emulator
appPackage: com.ellabook
appActivity: com.ellabook.startup.StartActivity
noReset: False
unicodeKeyboard: True
# 将键盘给隐藏起来
resetKeyboard: True

    
其他信息:

      Appium 1.15

      模拟器: 雷电模拟器4.0.7

      测试框架: pytest

conftest.py内容如下:

def basedriver(port=4723, **kwargs):
    """ 根据设置的参数,启动会话,并返回会话对象
    :param port: 会话启动端口号---int
    :param kwargs: 启动参数
    :return: 会话对象
    """
    yamls = YAML(typ='safe')
    yaml_path = os.path.join(CAPS_PATH, "desire_caps.yaml")
    fs = open(yaml_path, encoding='UTF-8')
    desire_caps = yamls.load(fs)
    if kwargs:
        for key, value in kwargs.items():
            desire_caps[key] = value

    driver = webdriver.Remote("http://localhost:{}/wd/hub".format(port), desire_caps)
    return driver

@pytest.fixture(scope="class")
def initdriver_first_start():
    """App首次启动"""
    driver = basedriver(noReset=False)
    yield driver
    driver.close()
测试用例py文件内容:
@pytest.mark.usefixtures("initdriver_first_start")
class TestAPPStart:
    """APP启动页测试:
     是否进入启动页 、banner图正常滑动、点击"开始看书吧"进入登录界面
    """

    def test_0_into_start(self, initdriver_first_start):
        """APP首次启动,启动页是否展示“开始阅读吧”按钮 """
        driver = initdriver_first_start
        AppStartPage(driver).check_read_book_is_exist()

    def test_banner_left_slip(self, initdriver_first_start):
        """APP首次启动,启动页广告图能够向左滑"""
        driver = initdriver_first_start
        AppStartPage(driver).slide_start_banner("left")  # App首次启动,banner广告图正常切换

    def test_banner_right_slip(self, initdriver_first_start):
        """APP首次启动,启动页广告图能够能够向右滑"""
        driver = initdriver_first_start
        AppStartPage(driver).slide_start_banner("right")  # App首次启动,banner广告图正常切换

    def test_click_button(self, initdriver_first_start):
        """APP首次启动,点击开始按钮,查看是否进入登录界面"""
        driver = initdriver_first_start
        AppStartPage(driver).click_start_read()  # 点击“开始阅读” 按钮
        LoginPage(driver).check_into_login_idle()  # 查看是否进入登录界面

APP启动页测试 测试类(pytest/py.test方式)运行,此时用例执行完成后,在进行测试类的teardown时,却报错:

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: 404 - undefined
图片说明

 网上百度了一堆资料,但依旧没有相关: 404 - undefined 的报错类型的解决方法(忧伤)

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Arcgis相交分析无法绘制一个或多个图形
    • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
    • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
    • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误
    • ¥30 3天&7天&&15天&销量如何统计同一行
    • ¥30 帮我写一段可以读取LD2450数据并计算距离的Arduino代码
    • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
    • ¥15 vs2019中数据导出问题
    • ¥20 云服务Linux系统TCP-MSS值修改?
    • ¥20 关于#单片机#的问题:项目:使用模拟iic与ov2640通讯环境:F407问题:读取的ID号总是0xff,自己调了调发现在读从机数据时,SDA线上并未有信号变化(语言-c语言)