zoukankan      html  css  js  c++  java
  • python3+Appium自动化09-Capability配置数据分离实践

    代码实现

    参数配置表:desired_caps.yaml

    platformName: Android
    deviceName: 192.168.175.101:5555
    platformVersion: 5.1
    app: C:UserszARTDesktopapp-artmall-release.apk
    appPackage: com.baozhenart.artmall
    appActivity: com.baozhenart.artmall.SplashActivity
    noReset: True
    unicodeKeyboard: True
    resetKeyboard: True
    ip: 127.0.0.1
    port: 4723

    读取配置表:capability_yaml.py

    #coding=utf-8
    from appium import webdriver
    import yaml
    
    file=open('desired_caps.yaml','r')
    data=yaml.load(file)
    print(data)
    driver = webdriver.Remote('http://'+str(data['ip'])+':'+str(data['port'])+'/wd/hub', data)
  • 相关阅读:
    栈和队列
    链表
    map
    二叉平衡树旋转
    二叉排序树详情
    红黑树详情
    查并集
    动态规划
    位操作
    字典树
  • 原文地址:https://www.cnblogs.com/shenhainixin/p/9298072.html
Copyright © 2011-2022 走看看