Commit 7091b4d8 authored by 刘丙寅's avatar 刘丙寅

Initial commit

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (android_maidian)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/android_maidian.iml" filepath="$PROJECT_DIR$/.idea/android_maidian.iml" />
</modules>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : __init__.py.py
# @Author : mocobk
# @Email : mailmzb@qq.com
# @Time : 2019/3/20 21:01
from .BeautifulReport import BeautifulReport
__all__ = ['BeautifulReport']
\ No newline at end of file
This diff is collapsed.
{
"title": "color: #438a08; font-size: 30px; font-weight: 700",
"color-info": "#928A82",
"color-success": "#779629",
"color-warning": "#F09D0A",
"color-danger": "#D2484E",
"btn-expand": "#296079",
"btn-expand-active": "#296079",
"btn-collapse": "#928A82",
"btn-collapse-active": "#928A82"
}
\ No newline at end of file
{
"title": "color: #438a08; font-size: 25px; font-weight: 700",
"sub-title": "color: #c4c4c4; font-size: 16px",
"color-banner": "#438a08",
"color-info": "#438a08",
"color-pass": "#438a08",
"color-skip": "#fc9c12",
"color-fail": "#ca1524",
"btn-collapse": "#f84b4d",
"btn-collapse-active": "#de4547",
"btn-expand": "#fc9c12",
"btn-expand-active": "#c77111"
}
\ No newline at end of file
{
"title": "color: #1ab394; font-size: 25px; font-weight: 700",
"sub-title": "color: #67a6c; font-size: 16px",
"color-banner": "#1ab394",
"color-info": "#1ab394",
"color-pass": "#1ab394",
"color-skip": "#f8ac59",
"color-fail": "#ed5565",
"btn-expand": "#1ab394",
"btn-expand-active": "#18a689",
"btn-collapse": "#ed5565",
"btn-collapse-active": "#ec4758"
}
\ No newline at end of file
{
"title": "color: #70AD47; font-size: 25px; font-weight: 700",
"sub-title": "color: #c4c4c4; font-size: 16px",
"color-banner": "#70AD47",
"color-info": "#555",
"color-pass": "#70AD47",
"color-skip": "#777777",
"color-fail": "#F25929",
"btn-expand": "#6ca745",
"btn-expand-active": "#568637",
"btn-collapse": "#F25929",
"btn-collapse-active": "#CA390C"
}
\ No newline at end of file
{
"title": "color: #25c6fc; font-size: 25px; font-weight: 700",
"sub-title": "color: #c4c4c4; font-size: 16px",
"color-banner": "#25c6fc",
"color-info": "#555",
"color-pass": "#25c6fc",
"color-skip": "#edd0be",
"color-fail": "#FF534D",
"btn-expand": "#25c6fc",
"btn-expand-active": "#1a9ac5",
"btn-collapse": "#EDD0BE",
"btn-collapse-active": "#bda596"
}
\ No newline at end of file
def maidiannumber(result):
length = len(result)
if length > 1:
print("共筛查出重复埋点数:%s" % length)
raise Exception('该埋点存在重复 %s' %result)
elif length < 1:
raise Exception('该埋点存在缺失或上报参数不对导致的筛选异常 %s' % result)
else:
print("埋点数据正常")
def devices_id(id):
id = int(id)
if id == 868410041790363:
print("设备号校验正常 预期设备号:868410041790363 实际设备号: %s" % id)
else:
raise Exception('设备号与预期不符,预期设备号为:868410041790363 实际设备号为: %s' % id)
def aaa(q,qq):
assert q == qq, "该埋点上报与预期不符 %s != %s"%(q,qq)
if __name__ == '__main__':
aaa(1,0)
\ No newline at end of file
from mitmproxy import http
import json
import gzip
import redis
# mitm服务 筛选对应域名下的数据 放入至redis里面
# redis实例 默认其实就是指定本地。不写也可以。
redis_gm = redis.Redis(host='localhost')
class Gmaddon:
def __init__(self):
'''需要再添加''' # 需要过滤的域名
self.host_list = ['log.igengmei.com', 'log.test.igengmei.com']
def request(self, flow: http.HTTPFlow):
'''do nothing here'''
# 进来直接灰度
# 抓的包里面的 http里面的所有的params
fields = flow.request.query.fields
# 修改deviceID 放到 fields里面
new_fields = tuple((x, y if x != "device_id" else '51') for x, y in fields)
# 又把修改后的参数 赋值给了的params
flow.request.query.fields = new_fields
if flow.request.host in self.host_list:
# 放在redis里面 下面是固定写法 后面.decode() 是解码
d = json.loads(gzip.decompress(flow.request.data.content).decode())
# json返回的不同 有时候最外层是【】 也有可能是{} 这里做一个区分。
if isinstance(d, list):
[redis_gm.lpush('maidian', json.dumps(item)) for item in d]
elif isinstance(d, dict):
redis_gm.lpush('maidian', json.dumps(d))
# 固定写法
addons = [
Gmaddon(),
]
\ No newline at end of file
import os
import time
import json
import redis
import copy
from pprint import pprint
from Charles import AssertLen
redis_gm = redis.Redis(host='localhost')
def mitm_query(**kwargs):
'''
1.这个方法使用一定要执行mitmdump -s maidianRedis.py --listen-port=8899'
2.手机一定要设备代理 port 8899,代理ip为执行机的ip
:param kwargs: 这个除了action,其他都应该是params里面的
:return:
'''
def inner_filter(data):
'''
json.dumps()
函数是将一个Python数据类型列表进行json格式的编码(可以这么理解,json.dumps()函数是将字典转化为字符串)
json.loads()
函数是将json格式数据转换为字典(可以这么理解,json.loads()函数是将字符串转化为字典)
'''
# data是个列表 对列表内的每个元素 反序列化 转换成 字典或者列表
# map的作用就是 将data里面列表的每一组数据 传入前面的json.loads()进行转化字典 再用对象接收。
# data = map(lambda x: json.loads(x), data)
for i in range(len(data)):
data[i] = json.loads(data[i])
# filter 筛选自己设备号下的数据 其实没用 因为你ui走的都是你这个设备的。
# data = filter(lambda x: x.get('device', {}).get('device_id') == "764FC20F-B97F-4F2E-868E-FC6E3042C96D", data)
# 将data 这个列表进行循环进入 lambda这个函数 进行筛选 用例里面我们自己传进来的action 通过action的健取到对应的值
action = kwargs.pop('action')
# 通过type 进行第一轮筛选
data = list(filter(lambda x: x.get('type') == action, data))
pprint(data)
# 通过健值对的方式 将params里面的数据全部取了出来。
for k, v in kwargs.items():
# 通过 params 进行第二轮筛选 并且形成一个健值对的形式。
print(f'=={k}:{v}==')
data = list(filter(lambda x,k1=k,v1=v: x.get('params', {}).get(k1) == v1, data))
pprint(list(copy.deepcopy(data)))
# 最后进行去重,ios部分会重复,数据端去重,这里也做去重判断
_data = []
for item in data:
if item not in _data:
_data.append(item)
print("最终筛选结果:开始")
pprint(_data)
print("最终筛选结果:结束")
return _data
time.sleep(3) # 等待埋点处理完毕
# 获取redis里面所有的数据 里面传值 0,-1 指的是 获取到 maidian 这个文件里面所有的内容
data = redis_gm.lrange('maidian', 0, -1)
# 将redis里面的数据 传给inner_filter 随后转成列表生成对象filter_result
filter_result = list(inner_filter(data))
pprint(filter_result)
device_id = filter_result[0].get("device").get("device_id")
AssertLen.devices_id(device_id)
return filter_result
\ No newline at end of file
This diff is collapsed.
#单引号列表 转化称双引号 先序列化 随后替换。
# import json
# result = json.dumps(result).replace("'", '"')
# print("*"*100)
# print(result[0].get("params").get("query"))
# print("*"*100)
# 隐式等待10秒 隔几秒钟去寻找一次元素 如果找到了 就开始执行 如果没有 就一直找 10秒钟
# driver.implicitly_wait(10)
# 强制等待10秒
# time.sleep(10)
# 普通的调用找元素
# ele = driver.find_element(by, value)
# coding=utf-8
import unittest
import time
import HTMLTestRunner_jpg
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import smtplib
from unittestreport import TestRunner
import os
import sys
import json
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
#
#
# '''
# #### 下面三行代码python2报告出现乱码时候可以加上####
# import sys
# reload(sys)
# sys.setdefaultencoding('utf8')
# '''
#
# # 优化版执行所有用例并发送报告,分四个步骤
# # 第一步加载用例
# # 第二步执行用例
# # 第三步获取最新测试报告
# # 第四步发送邮箱 (这一步不想执行的话,可以注释掉最后面那个函数就行)
#
#
# # 当前脚本所在文件真实路径
# cur_path = os.path.dirname(os.path.realpath(__file__))
#
#
# #第一步具体方法
# def add_case(caseName="case", rule="case*.py"):
# '''第一步:加载所有的测试用例'''
# case_path = os.path.join(cur_path, caseName) # 用例文件夹
# # 如果不存在这个case文件夹,就自动创建一个
# if not os.path.exists(case_path):os.mkdir(case_path)
# print("title case path:%s"%case_path)
# # 定义discover方法的参数
# discover = unittest.defaultTestLoader.discover(case_path,
# pattern=rule,
# top_level_dir=None)
# print(discover)
# return discover
#
# #第二步具体方法
# def run_case(all_case, reportName="report"):
#
# '''第二步:执行所有的用例, 并把结果写入HTML测试报告'''
# now = time.strftime("%Y_%m_%d_%H_%M_%S")
# report_path = os.path.join(cur_path, reportName) # 用例文件夹
# # 如果不存在这个report文件夹,就自动创建一个
# if not os.path.exists(report_path):os.mkdir(report_path)
# #{}和。format()去掉 就是替换这个文件。
# # report_abspath = os.path.join(report_path, "result{}.html".format(now))
# report_abspath = os.path.join(report_path, "result.html")
# print("report path:%s"%report_abspath)
# fp = open(report_abspath, "wb")
#
# #星宇的一套页面效果
# runner = HTMLTestRunner_jpg.HTMLTestRunner(stream=fp,
# title=u'更美-ai自动化测试报告,测试结果如下:',
# description=u'用例执行情况:')
# #调用add_case函数返回值 获取最终结果值
# res = runner.run(all_case)
# # 获取他的错误的用例数量。
# error_count = res.error_count
# #获取他的失败的用例数量。
# failure_count = res.failure_count
# fp.close()
# return error_count,failure_count
#
#
# #奉龙的这一套 报告页面效果
# from BeautifulReport import BeautifulReport
#
# runner = BeautifulReport(all_case)
# runner.report('更美ai-接口自动化',filename='更美ai.html',log_path='report')
# #
# # return runner.error_count,runner.failure_count
#
# #第三步具体方法
# def get_report_file(report_path):
# '''第三步:获取最新的测试报告'''
# lists = os.listdir(report_path)
# lists.sort(key=lambda fn: os.path.getmtime(os.path.join(report_path, fn)))
# print (u'最新测试生成的报告: '+lists[-1])
# # 找到最新生成的报告文件
# report_file = os.path.join(report_path, lists[-1])
# return report_file
#
# #第四步具体方法
def send_mail(sender, psw, receiver, smtpserver, report_file, port):
'''第四步:发送最新的测试报告内容'''
with open(report_file, "rb") as f:
mail_body = f.read()
# 定义邮件内容
now_time = time.strftime("%Y-%m-%d %H:%M:%S")
msg = MIMEMultipart()
body = MIMEText(mail_body, _subtype='html', _charset='utf-8')
#添加报告title时间戳
msg['Subject'] = u"更美-ai_接口自动化测试报告"
#msg['Subject'] = u"自动化测试报告_%s"%now_time
msg["from"] = sender
msg["to"] = "".join(receiver) # 只能字符串
msg.attach(body)
# 添加附件
att = MIMEText(open(report_file, "rb").read(), "base64", "utf-8")
att["Content-Type"] = "application/octet-stream"
att["Content-Disposition"] = 'attachment; filename= "report.html"'
msg.attach(att)
try:
smtp = smtplib.SMTP()
smtp.connect(smtpserver) # 连服务器
smtp.login(sender, psw)
except:
smtp = smtplib.SMTP_SSL(smtpserver, port)
smtp.login(sender, psw) # 登录
smtp.sendmail(sender, receiver, msg.as_string())
smtp.quit()
print('title report email has send out !')
#
#
#
#
# # 整体调用流程
# if __name__ == "__main__":
# # 1 加载用例
# all_case = add_case()
#
# # 2 执行用例
# error_count,failure_count = run_case(all_case)
#
# # 获取最新的测试报告文件
# report_path = os.path.join(cur_path, "report") # 用例文件夹
#
# # 3获取最新的测试报告
# report_file = get_report_file(report_path)
#
# # -----------------------------------------------以下为第四步的配置传参内容-----------------------------------------------
# # 邮箱配置 发送邮箱的地址
# sender = "liubingyin@igengmei.com" # sender = "l709188456@163.com"
# #邮箱密码
# psw = "cgBP3fw2ZNgp3L5r" #psw = "3328378"
# # 163服务器的servers
# #smtp_server = "smtp.163.com"
# # 公司地址的服务器server
# smtp_server = "smtp.exmail.qq.com"
# port = 465
# # 发给谁的邮箱
# receiver = ["liubingyin@igengmei.com"]
# # --------------------------------------------------------------------------------------------------------------------
# # 4最后一步发送报告
# send_mail(sender, psw, receiver, smtp_server, report_file, port)
if __name__ == '__main__':
# case_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),"case")
case_path = os.path.join(os.path.realpath(""), "case")
discover = unittest.defaultTestLoader.discover(case_path,pattern="case*.py",top_level_dir=None)
# from BeautifulReport import BeautifulReport
#
# # 放入对应的html文件是在这里放 (report_dir='report')
# runner = BeautifulReport(discover)
# runner.report('更美android-埋点自动化',filename='更美android埋点.html',report_dir='report')
# error = runner.error_count
# failure = runner.failure_count
runner = TestRunner(discover, report_dir="report")
res = runner.rerun_run(count=3, interval=2)
report_path = os.path.join(os.path.realpath(""), "report")
# 这是为了获取report里面文件列表
lists = os.listdir(report_path)
lists.sort(key=lambda fn: os.path.getmtime(os.path.join(report_path, fn)))
print (u'最新测试生成的报告: '+lists[-1])
# 找到最新生成的报告文件
report_file = os.path.join(report_path, lists[-1])
sender = "liubingyin@igengmei.com" # sender = "l709188456@163.com"
#邮箱密码
psw = "cgBP3fw2ZNgp3L5r" #psw = "3328378"
# 163服务器的servers
#smtp_server = "smtp.163.com"
# 公司地址的服务器server
smtp_server = "smtp.exmail.qq.com"
port = 465
# 发给谁的邮箱
receiver = ["liubingyin@igengmei.com"]
# --------------------------------------------------------------------------------------------------------------------
# 4最后一步发送报告
send_mail(sender, psw, receiver, smtp_server, report_file, port)
\ No newline at end of file
import time
def backapp(driver, timewait):
time.sleep(3)
driver.background_app(timewait)
from appium import webdriver
import unittest
from Charles.maidianRedis import redis_gm
import time
class appiumConfig(unittest.TestCase):
def setUp(self):
#初始化开始操作前 删除本地的redis信息
redis_gm.delete("maidian")
desired_caps = {}
desired_caps['platformName'] = 'Android'
# 测试的手机操作系统
desired_caps['platformVersion'] = '10'
# 手机操作系统版本
desired_caps['deviceName'] = 'CTN0220321018400'
# 手机类型或模拟器类型(通过adbdevices查看)
desired_caps['appPackage'] = 'com.wanmeizhensuo.zhensuo'
# 包名(都通过adb shell dumpsys package | grep wanmeizhensuo 来查看包的地址。)
desired_caps['appActivity'] = '.module.MainActivity'
# activity名 这个你需要通过上面的命令看
desired_caps['noReset'] = True
# 不重新进行签名
# 打印出来抓去元素那个工具 所需要的配置项
import json
print(json.dumps(desired_caps,indent=2))
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
return self.driver
def tearDown(self):
time.sleep(3)
print("tearDown")
self.driver.quit()
li = [-9,-5,-1,0,2,5,9,12,15]
if 0 in li:
print(li.index(0))
else:
print("-1")
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException
from appium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
def element(driver, Element):
for by, value, times in Element:
try:
# 添加显示等待
wait = WebDriverWait(driver, times, 0.5)
ele = wait.until(EC.presence_of_element_located((by, value)), message="元素未能找到")
except:
continue
else:
return ele
else:
raise NoSuchElementException('元素未能找到!')
def ElementNotAssert(driver, Element):
for by, value, times in Element:
try:
# 添加显示等待
wait = WebDriverWait(driver, times, 0.5)
ele = wait.until(EC.presence_of_element_located((by, value)), message="元素未能找到")
ele.click()
break
except:
pass
def notnull(key):
for i in key:
print("局部参数值:%s"%i)
if i in ["", None]:
raise Exception(i, "局部参数值存在为空")
else:
print("局部参数值正常: %s" %i)
def AssertExpect(expect, actual):
assert expect == actual, "该埋点上报与预期不符 %s != %s" %(expect, actual)
def AssertParameter(Parameter1, Parameter2):
if Parameter1 in Parameter2:
pass
else:
raise Exception("%s 参数有问题" % Parameter1)
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
# import event
from appiumConfigure.config import appiumConfig
from appiumConfigure import find_element
from page import login_Page, home_Page
import time
class Case(appiumConfig):
def test_01_username_and_password_login(self):
'登录页面'
# 点击首页关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
#点击 我 按钮
ele = find_element.element(self.driver, home_Page.me)
ele.click()
# 点击账号登录
ele = find_element.element(self.driver, login_Page.password_login)
ele.click()
# 点击账号框
ele = find_element.element(self.driver, login_Page.click_username)
ele.click()
# 输入账号
ele = find_element.element(self.driver, login_Page.sendkeys_username)
ele.send_keys(login_Page.username)
# 输入密码
ele = find_element.element(self.driver, login_Page.sendkeys_password)
ele.send_keys(login_Page.password)
#点击立即登录按钮
ele = find_element.element(self.driver, login_Page.login_button)
ele.click()
This diff is collapsed.
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
# import event
from appiumConfigure.config import appiumConfig
from appiumConfigure import find_element
from page import home_Page,search_Page,ai_Page
from Charles.mitm import mitm_query
from appiumConfigure import backtoapp
from Charles import AssertLen
import time
class Case(appiumConfig):
def test01_double_eye_take_photo_record_button(self):
'模拟双眼皮拍照按钮点击'
#关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 首页点击双眼皮按钮
ele = find_element.element(self.driver,home_Page.double_eye)
ele.click()
# 弹窗关闭按钮点击
find_element.ElementNotAssert(self.driver,ai_Page.double_eye_iv_close_pop)
# 点击拍照按钮
ele = find_element.element(self.driver,ai_Page.double_eye_take_photo_record_button)
ele.click()
backtoapp.backapp(self.driver,2)
# "params": {
# "referrer": "",
# "referrer_id": "",
# "button_name": "take_pic",
# "page_name": "face_scan",
# "tab_name": "模拟双眼皮",
# "referrer_link": [
# ""
# ],
# "business_id": ""
# },
# "type": "on_click_button",
result = mitm_query(action="on_click_button",button_name="take_pic",page_name="face_scan",tab_name="模拟双眼皮")
AssertLen.maidiannumber(result)
def test02_(self):
'模拟双眼皮相册按钮点击'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 首页点击双眼皮按钮
ele = find_element.element(self.driver, home_Page.double_eye)
ele.click()
# 弹窗关闭按钮点击
find_element.ElementNotAssert(self.driver, ai_Page.double_eye_iv_close_pop)
# 点击相册按钮
ele = find_element.element(self.driver,ai_Page.take_photo_album_img)
ele.click()
backtoapp.backapp(self.driver,2)
# "params": {
# "referrer": "",
# "referrer_id": "",
# "button_name": "album",
# "page_name": "face_scan",
# "tab_name": "模拟双眼皮",
# "referrer_link": [
# ""
# ],
# "business_id": "34027087"
# },
# "type": "on_click_button",
result = mitm_query(action="on_click_button", button_name="album", page_name="face_scan", tab_name="模拟双眼皮")
AssertLen.maidiannumber(result)
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
# import event
from appiumConfigure.config import appiumConfig
from appiumConfigure import find_element
from page import home_Page,search_Page,ai_Page
from Charles.mitm import mitm_query
from appiumConfigure import backtoapp
from Charles import AssertLen
import time
class Case(appiumConfig):
def test_01_jump_button(self):
'跳过按钮埋点'
#点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击相册按钮
PictureButton = find_element.element(self.driver, ai_Page.PictureButton)
PictureButton.click()
# 点击第一个照片
picture = find_element.element(self.driver, ai_Page.picture)
picture.click()
# 点击跳过按钮
jump = find_element.element(self.driver, ai_Page.jump)
jump.click()
# 退至后台
backtoapp.backapp(self.driver, 2)
#跳过按钮埋点
# "params": {
# "button_name": "skip",
# "page_name": "face_scan_loading",
# "referrer_link": [
# "",
# "face_scan"
# ]
# },
# "type": "on_click_button"
result = mitm_query(action="on_click_button", button_name="skip", page_name="face_scan_loading")
AssertLen.maidiannumber(result)
def test_02_picture_button(self):
'相册按钮埋点'
#点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击相册按钮
PictureButton = find_element.element(self.driver, ai_Page.PictureButton)
PictureButton.click()
#退至后台
backtoapp.backapp(self.driver, 2)
# 点击相册埋点
# "params": {
# "button_name": "album",
# "page_name": "face_scan",
# "tab_name": "AI测脸",
# "referrer_link": [
# ""
# ]
# },
# "type": "on_click_button"
result = mitm_query(action="on_click_button", page_name="face_scan", button_name="album", tab_name="AI测脸")
print(result)
# q 如果是1正常 超出1 埋点就重复了。
AssertLen.maidiannumber(result)
# 因为是列表的形式存储的 所以 要用[0]的格式取
res = result[0].get("params").get("page_name")
print(res)
def test_03_last_button(self):
'上次报告按钮埋点'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 扫脸引导弹窗关闭按钮 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击上次报告按钮
Last_report = find_element.element(self.driver, ai_Page.Last_report)
Last_report.click()
# 退至后台
backtoapp.backapp(self.driver, 2)
# "params": {
# "button_name": "last_report",
# "page_name": "face_scan",
# "tab_name": "AI测脸",
# "referrer_link": [
# ""
# ]
# },
# "type": "on_click_button",
result = mitm_query(action="on_click_button", page_name="face_scan", button_name="last_report", tab_name="AI测脸")
AssertLen.maidiannumber(result)
def test_04_take_photo_record_button(self):
'拍照按钮埋点'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击拍照按钮
take_photo_record_button = find_element.element(self.driver, ai_Page.take_photo_record_button)
take_photo_record_button.click()
# 退至后台
backtoapp.backapp(self.driver,3)
# {'button_name': 'take_pic'
# 'page_name': 'face_scan',
# 'tab_name': 'AI测脸',
# 'referrer_link': ['']},
# 'type': 'on_click_button'
result = mitm_query(action="on_click_button", tab_name="AI测脸", page_name="face_scan", button_name="take_pic")
AssertLen.maidiannumber(result)
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
from Charles.mitm import mitm_query
from Charles import AssertLen
from appiumConfigure.config import appiumConfig
from appiumConfigure import find_element
from appiumConfigure import backtoapp
from page import home_Page, ai_Page
class Case(appiumConfig):
def test_01(self):
'面孔tab点击'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击面孔起源tab
face_ai_gene = find_element.element(self.driver, ai_Page.face_ai_gene)
face_ai_gene.click()
backtoapp.backapp(self.driver, 3)
# "params": {
# "page_name": "face_scan",
# "referrer_link": [
# ""
# ],
# "tab_name": "AI面孔",
# "position": 2
# },
# "type": "on_click_tab",
result = mitm_query(action="on_click_tab", page_name="face_scan", tab_name="AI面孔", position=2)
AssertLen.maidiannumber(result)
def test_02(self):
'男生按钮选择框点击'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击面孔起源tab
face_ai_gene = find_element.element(self.driver, ai_Page.face_ai_gene)
face_ai_gene.click()
# 点击男生选项
face_gene_male = find_element.element(self.driver, ai_Page.face_gene_male)
face_gene_male.click()
backtoapp.backapp(self.driver, 3)
# "params": {
# "button_name": "male",
# "page_name": "face_scan",
# "tab_name": "AI面孔",
# "referrer_link": [
# ""
# ]
# },
# "type": "on_click_button",
result = mitm_query(action="on_click_button", page_name="face_scan", tab_name="AI面孔", button_name="male")
AssertLen.maidiannumber(result)
def test_03(self):
'女生按钮选择框点击'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击面孔起源tab
face_ai_gene = find_element.element(self.driver, ai_Page.face_ai_gene)
face_ai_gene.click()
# 点击女生选项
face_gene_male = find_element.element(self.driver, ai_Page.face_gene_female)
face_gene_male.click()
backtoapp.backapp(self.driver, 3)
# {'button_name': 'female'
# , 'page_name': 'face_scan',
# 'tab_name': 'AI面孔',
# 'referrer_link': ['']},
# 'type': 'on_click_button',
result = mitm_query(action="on_click_button", page_name="face_scan", tab_name="AI面孔", button_name="female")
AssertLen.maidiannumber(result)
def test_04(self):
'相册按钮点击'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击面孔起源tab
face_ai_gene = find_element.element(self.driver, ai_Page.face_ai_gene)
face_ai_gene.click()
# 点击女生选项
face_gene_male = find_element.element(self.driver, ai_Page.face_gene_female)
face_gene_male.click()
# 点击相册按钮
PictureButton = find_element.element(self.driver, ai_Page.PictureButton)
PictureButton.click()
# 退至后台
backtoapp.backapp(self.driver, 2)
# 点击相册埋点
# "params": {
# "button_name": "album",
# "page_name": "face_scan",
# "tab_name": "AI面孔",
# "referrer_link": [
# ""
# ]
# },
# "type": "on_click_button",
result = mitm_query(action="on_click_button", page_name="face_scan", button_name="album", tab_name="AI面孔")
print(result)
# q 如果是1正常 超出1 埋点就重复了。
AssertLen.maidiannumber(result)
# 因为是列表的形式存储的 所以 要用[0]的格式取
res = result[0].get("params").get("page_name")
print(res)
def test_05(self):
# 点击跳过按钮
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击面孔起源tab
face_ai_gene = find_element.element(self.driver, ai_Page.face_ai_gene)
face_ai_gene.click()
# 点击女生选项
face_gene_male = find_element.element(self.driver, ai_Page.face_gene_female)
face_gene_male.click()
# 点击相册按钮
PictureButton = find_element.element(self.driver, ai_Page.PictureButton)
PictureButton.click()
# 点击第一个照片
picture = find_element.element(self.driver, ai_Page.picture)
picture.click()
# 点击跳过按钮
jump = find_element.element(self.driver, ai_Page.jump)
jump.click()
backtoapp.backapp(self.driver, 3)
# "params": {
# "button_name": "skip",
# "page_name": "face_scan_loading",
# "referrer_link": [
# "",
# "face_scan"
# ]
# },
# "type": "on_click_button",
result = mitm_query(action="on_click_button", button_name="skip", page_name="face_scan_loading")
AssertLen.maidiannumber(result)
def test_06(self):
# 点击上次报告按钮埋点
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击面孔起源tab
face_ai_gene = find_element.element(self.driver, ai_Page.face_ai_gene)
face_ai_gene.click()
# 点击男生选项
face_gene_male = find_element.element(self.driver, ai_Page.face_gene_male)
face_gene_male.click()
# 点击上次报告按钮
Last_report = find_element.element(self.driver, ai_Page.Last_report)
Last_report.click()
# 退至后台
backtoapp.backapp(self.driver, 2)
# {'button_name': 'last_report',
# 'page_name': 'face_scan',
# 'tab_name': 'AI面孔',
# 'referrer_link': ['']},
# 'type': 'on_click_button'
result = mitm_query(action="on_click_button", page_name="face_scan", button_name="last_report", tab_name="AI面孔")
AssertLen.maidiannumber(result)
def test_07(self):
'面孔起源拍照按钮点击'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击面孔起源tab
face_ai_gene = find_element.element(self.driver, ai_Page.face_ai_gene)
face_ai_gene.click()
# 点击男生选项
face_gene_male = find_element.element(self.driver, ai_Page.face_gene_male)
face_gene_male.click()
# 点击拍照按钮
take_photo_record_button = find_element.element(self.driver, ai_Page.take_photo_record_button)
take_photo_record_button.click()
backtoapp.backapp(self.driver, 3)
# "params": {
# "button_name": "take_pic",
# "page_name": "face_scan",
# "tab_name": "AI面孔",
# "referrer_link": [
# ""
# ]
# },
# "type": "on_click_button",
result = mitm_query(action="on_click_button", tab_name="AI面孔", page_name="face_scan", button_name="take_pic")
AssertLen.maidiannumber(result)
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
from Charles.mitm import mitm_query
from Charles import AssertLen
from appiumConfigure.config import appiumConfig
from appiumConfigure import find_element
from appiumConfigure import backtoapp
from page import home_Page, ai_Page
class Case(appiumConfig):
def test_01(self):
'测肤tab点击埋点'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击测肤tab
skin_tab = find_element.element(self.driver, ai_Page.skin_tab)
skin_tab.click()
backtoapp.backapp(self.driver,3)
#{'page_name': 'face_scan',
# 'referrer_link': [''],
# 'tab_name': 'AI测肤',
# 'position': 1}
# 'type': 'on_click_tab',
result = mitm_query(action="on_click_tab", page_name="face_scan", tab_name="AI测肤", position=1)
AssertLen.maidiannumber(result)
def test_02(self):
'点击相册按钮'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击测肤tab
skin_tab = find_element.element(self.driver, ai_Page.skin_tab)
skin_tab.click()
# 点击相册按钮
PictureButton = find_element.element(self.driver, ai_Page.PictureButton)
PictureButton.click()
# 退至后台
backtoapp.backapp(self.driver, 2)
# 点击相册埋点
# "params": {
# "button_name": "album",
# "page_name": "face_scan",
# "tab_name": "AI测脸",
# "referrer_link": [
# ""
# ]
# },
# "type": "on_click_button"
result = mitm_query(action="on_click_button", page_name="face_scan", button_name="album", tab_name="AI测肤")
AssertLen.maidiannumber(result)
def test_03(self):
'点击上次报告按钮'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 扫脸引导弹窗关闭按钮 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击测肤tab
skin_tab = find_element.element(self.driver, ai_Page.skin_tab)
skin_tab.click()
# 点击上次报告按钮
Last_report = find_element.element(self.driver, ai_Page.Last_report)
Last_report.click()
# 退至后台
backtoapp.backapp(self.driver, 2)
# "params": {
# "button_name": "last_report",
# "page_name": "face_scan",
# "tab_name": "AI测脸",
# "referrer_link": [
# ""
# ]
# },
# "type": "on_click_button",
result = mitm_query(action="on_click_button", page_name="face_scan", button_name="last_report", tab_name="AI测肤")
AssertLen.maidiannumber(result)
def test_04(self):
'点击拍照按钮'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击测肤tab
skin_tab = find_element.element(self.driver, ai_Page.skin_tab)
skin_tab.click()
# 点击拍照按钮
take_photo_record_button = find_element.element(self.driver, ai_Page.take_photo_record_button)
take_photo_record_button.click()
# 退至后台
backtoapp.backapp(self.driver, 3)
# {'button_name': 'take_pic', 、
# 'page_name': 'face_scan',
# 'tab_name': 'AI测脸',
# 'referrer_link': ['']},
# 'type': 'on_click_button'
result = mitm_query(action="on_click_button", tab_name="AI测肤", page_name="face_scan", button_name="take_pic")
AssertLen.maidiannumber(result)
\ No newline at end of file
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
from Charles.mitm import mitm_query
from Charles import AssertLen
from appiumConfigure.config import appiumConfig
from appiumConfigure import find_element
from appiumConfigure import backtoapp
from page import home_Page, ai_Page
class Case(appiumConfig):
def test_01_zhengxing_tab_click(self):
'模拟整形tab埋点点击'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击模拟整形tab
ele = find_element.element(self.driver,ai_Page.zhengxing_tab)
ele.click()
backtoapp.backapp(self.driver,2)
# "params": {
# "referrer": "",
# "referrer_id": "",
# "page_name": "face_scan",
# "tab_name": "模拟整形",
# "referrer_link": [
# ""
# ],
# "position": 5,
# "business_id": "34027087"
# },
# "type": "on_click_tab",
result = mitm_query(action="on_click_tab", page_name="face_scan", tab_name="模拟整形")
AssertLen.maidiannumber(result)
def test_02_zhengxing_picturebutton_click(self):
'模拟整形相册按钮点击'
# 点击关闭弹窗
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击扫脸按钮
scan = find_element.element(self.driver, home_Page.scan)
scan.click()
# 点击扫脸引导弹窗 -- 出现不稳定 采用容错机制
find_element.ElementNotAssert(self.driver, ai_Page.aiScan)
# 点击模拟整形tab
ele = find_element.element(self.driver, ai_Page.zhengxing_tab)
ele.click()
# 点击模拟整形相册按钮
ele = find_element.element(self.driver,ai_Page.zhengxing_picture_button)
ele.click()
backtoapp.backapp(self.driver,2)
# "params": {
# "referrer": "",
# "referrer_id": "",
# "button_name": "album",
# "page_name": "face_scan",
# "tab_name": "AI整形",
# "referrer_link": [
# ""
# ],
# "business_id": "34027087"
# },
# "type": "on_click_button",
result = mitm_query(action="on_click_button", button_name="album", page_name="face_scan", tab_name="AI整形")
AssertLen.maidiannumber(result)
\ No newline at end of file
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
# import event
from appiumConfigure.config import appiumConfig
from appiumConfigure import find_element
from page import home_Page,search_Page
from Charles.mitm import mitm_query
from appiumConfigure import backtoapp
from Charles import AssertLen
import time
import json
from pprint import pprint
class Case(appiumConfig):
def test_01_CityFilter(self):
'城市选择器点击埋点'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击导航栏地域选择框(选择城市按钮)
ele = find_element.element(self.driver,home_Page.city)
ele.click()
backtoapp.backapp(self.driver,2)
result = mitm_query(action="home_click_navbar_area",page_name="home")
AssertLen.maidiannumber(result)
def test_02_addBUtton(self):
'首页发帖按钮+号点击埋点'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 首页点击➕号按钮
ele = find_element.element(self.driver,home_Page.add_button)
ele.click()
backtoapp.backapp(self.driver,2)
# "params": {
# "page_name": "home",
# "referrer_link": [
#
# ],
# "type": "new"
# },
# "type": "on_click_create_topic",
result = mitm_query(action="on_click_create_topic",page_name="home",type="new")
AssertLen.maidiannumber(result)
def test_03_home_icon(self):
'金刚区按钮点击埋点'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 金刚区按钮点击
ele = find_element.element(self.driver,home_Page.home_jingang_icon)
ele.click()
backtoapp.backapp(self.driver,2)
# "params": {
# "current_position": 0,
# "referrer_link": [],
# "card_type": "icon",
# "transaction_type": "operation",
# "card_content_type": "16",
# "total_position": 2,
# "url": "gengmei://operation_together?cp_id=9",
# "card_id": "26",
# "module_id": 26,
# "result_status": "",
# "page_name": "home",
# "card_name": "玻尿酸",
# "position": 0,
# "in_page_pos": "outer_face"
# },
# "type": "on_click_card",
result = mitm_query(action="on_click_card",in_page_pos="outer_face",page_name="home",card_type="icon")
AssertLen.maidiannumber(result)
url = result[0].get("params").get("url")
find_element.notnull((url,))
def test_04_BannerClick(self):
'首页banner点击埋点'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击banner
ele = find_element.element(self.driver,home_Page.banner_click)
ele.click()
backtoapp.backapp(self.driver, 2)
# "params": {
# "referrer_id": "2695",
# "referrer_link": [],
# "transaction_type": "operation",
# "card_type": "banner",
# "card_id": 1983,
# "referrer": "open_ad",
# "module_id": 9280,
# "page_name": "home",
# "card_name": "女神新人馆",
# "card_content_type ": "自定义专题页面",
# "position": 2,
# "business_id": "",
# "in_page_pos": "top"
# },
# "type": "on_click_card",
result = mitm_query(action="on_click_card",card_type="banner",referrer="open_ad",page_name="home")
AssertLen.maidiannumber(result)
def test_05_FourTofu(self):
'首页四分区豆腐块点击埋点'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 首页四分区豆腐块点击
ele = find_element.element(self.driver,home_Page.four_fotu)
ele.click()
backtoapp.backapp(self.driver,2)
# "params": {
# "module_id": 1148,
# "target_name": "",
# "module_type": 44,
# "grid": "a",
# "page_name": "home",
# "referrer_link": [],
# "position": 0,
# "transaction_type": "operation",
# "card_type": "gadget",
# "card_content_type": "45",
# "business_id": "",
# "card_id": "1980"
# },
# "type": "on_click_card",
result = mitm_query(action="on_click_card", card_type="gadget", page_name="home", grid="a")
AssertLen.maidiannumber(result)
def test_06_title_hengtiao(self):
'首页顶部横条'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击顶部滑动条功能
ele = find_element.element(self.driver,home_Page.title_hengtiao)
ele.click()
backtoapp.backapp(self.driver,2)
# "params": {
# "module_id": "21",
# "page_name": "home",
# "card_name": "新人免单",
# "referrer_link": [],
# "absolute_position": 0,
# "position": 0,
# "card_type": "function_entrance",
# "transaction_type": "operation",
# "url": "gengmei://common_webview?url=https://backend.igengmei.com/phantom/visual_special/1975"
# },
# "type": "on_click_card",
result = mitm_query(action="on_click_card",page_name="home",absolute_position=0,card_type="function_entrance")
AssertLen.maidiannumber(result)
url = result[0].get("params").get("url")
find_element.notnull((url,))
def test_07_Shooping_mall(self):
'点击底部商城按钮埋点'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
#点击底部商城按钮
ele = find_element.element(self.driver,home_Page.Shooping_mall_click)
ele.click()
backtoapp.backapp(self.driver,2)
# "params": {
# "referrer": "",
# "sec_tab_name": "",
# "tab_type": "out_tab",
# "referrer_id": "2695",
# "page_name": "welfare_home",
# "tab_name": "welfare",
# "referrer_link": [],
# "position": "1",
# "business_id": ""
# },
# "type": "on_click_tab",
result = mitm_query(action="on_click_tab", tab_type="out_tab", page_name="welfare_home", tab_name="welfare")
AssertLen.maidiannumber(result)
This diff is collapsed.
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
# import event
from appiumConfigure.config import appiumConfig
from appiumConfigure import find_element
from page import home_Page,search_Page
from Charles.mitm import mitm_query
from appiumConfigure import backtoapp
from Charles import AssertLen
class Case(appiumConfig):
def test_01(self):
'取消按钮点击'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击搜索输入框
ele = find_element.element(self.driver, home_Page.search_sendkey_click)
ele.click()
# 搜索页面取消按钮点击
ele = find_element.element(self.driver,search_Page.search_cancel)
ele.click()
backtoapp.backapp(self.driver,2)
# "params": {
# "business_id": "",
# "page_name": "search_home",
# "referrer_link": [
# "home"
# ],
# "referrer": "home",
# "button_name": "return",
# "referrer_id": ""
# },
# "type": "on_click_button",
result = mitm_query(action="on_click_button",page_name="search_home",referrer="home",button_name="return")
AssertLen.maidiannumber(result)
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
# import event
from appiumConfigure.config import appiumConfig
from appiumConfigure import find_element
from page import home_Page,search_Page
from Charles.mitm import mitm_query
from appiumConfigure import backtoapp
from Charles import AssertLen
class Case(appiumConfig):
def test_01(self):
'首页搜索输入框点击'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击搜索输入框
ele = find_element.element(self.driver,home_Page.search_sendkey_click)
ele.click()
backtoapp.backapp(self.driver, 2)
# 埋点实例
# 'params': {'explicit_word_num': 1, 'page_name': 'home', 'referrer_link': []},
# 'type': 'on_click_navbar_search',
result = mitm_query(action="on_click_navbar_search",page_name="home",explicit_word_num=1)
AssertLen.maidiannumber(result)
def test_02(self):
'热门搜索点击'
# 关闭弹窗点击
ele = find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击搜索输入框
ele = find_element.element(self.driver, home_Page.search_sendkey_click)
ele.click()
# 获取按钮文案
ele = find_element.element(self.driver, search_Page.hot_search)
hot_search_text = ele.text
# 点击热门搜索第一个选项
ele = find_element.element(self.driver,search_Page.hot_search)
ele.click()
# "params": {
# "referrer_link": [
# "home"
# ],
# "position": 0,
# "query_id": "1651",
# "query": "瘦脸针580",
# "card_name": "瘦脸针580",
# "card_id": "1651",
# "referrer": "home",
# "transaction_type": "promote",
# "referrer_id": "",
# "page_name": "search_home",
# "card_type": "search_word",
# "business_id": "",
# "card_content_type": "自定义专题页面",
# "in_page_pos": "热门"
# },
# "type": "on_click_card",
# 过滤埋点数据
result = mitm_query(action="on_click_card", in_page_pos="热门", card_content_type="自定义专题页面", page_name="search_home")
AssertLen.maidiannumber(result)
# 获取个别 value
query_id = result[0].get("params").get("query_id")
card_name = result[0].get("params").get("card_name")
position = result[0].get("params").get("position")
# 判空
find_element.notnull((query_id,card_name,position))
# 判断是否和预期相符
find_element.AssertExpect(hot_search_text, card_name)
def test_03(self):
'热门榜第一位点击'
# 关闭弹窗点击
find_element.ElementNotAssert(self.driver, home_Page.dialog_home_img_cancel)
# 点击搜索输入框
ele = find_element.element(self.driver, home_Page.search_sendkey_click)
ele.click()
# 获取顶部搜索框文案
ele = find_element.element(self.driver,search_Page.search_content)
search_content = ele.text
# 点击更美热门榜第一位
ele = find_element.element(self.driver,search_Page.hot_list)
ele.click()
backtoapp .backapp(self.driver, 2)
# 'params': {'business_id': '',
# 'in_page_pos': '更美热门榜',
# 'page_name': 'search_home',
# 'position': '2',
# 'query': '下巴',
# 'referrer': 'home'
# 'referrer_id': '',
# 'referrer_link': ['home'],
# 'word_position': '0'},
# 'type': 'on_click_card'
result = mitm_query(action="on_click_card",in_page_pos="更美热门榜", page_name="search_home", referrer="home")
# 获取局部参数
position = result[0].get("params").get("position")
word_position = result[0].get("params").get("word_position")
query = result[0].get("params").get("query")
# 判空
find_element.notnull((position, word_position))
#判断预期
find_element.AssertExpect(search_content,query)
This diff is collapsed.
File added
from selenium.webdriver.common.by import By
#弹窗关闭按钮
double_eye_iv_close_pop = [(By.ID,'com.wanmeizhensuo.zhensuo:id/iv_close_pop',5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.ImageView',5)]
# 模拟双眼皮拍照按钮点击
double_eye_take_photo_record_button = [(By.ID,'com.wanmeizhensuo.zhensuo:id/take_photo_record_button',5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[2]/android.widget.ImageView',5)]
# 双眼皮相册按钮点击
take_photo_album_img = [(By.ID,'com.wanmeizhensuo.zhensuo:id/take_photo_album_img',5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[2]/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.ImageView[2]',5)]
# 点击扫脸引导弹窗
aiScan = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/face_select_iv_guide_close', 5),
(By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[2]/android.widget.ImageView', 5)]
# 点击相册按钮
PictureButton = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/take_photo_album_img', 5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[2]/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.ImageView', 5)]
# 点击某一张图片
picture = [(By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.GridView/android.widget.FrameLayout[2]/android.widget.RelativeLayout/android.widget.ImageView',5)]
# 跳过按钮
jump = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/jump_over_tv',10), (By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.TextView',10)]
# 上次报告按钮
Last_report = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/face_scan_tv_last_report', 5),(By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[2]/android.widget.TextView', 5)]
# 点击拍照按钮
take_photo_record_button = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/take_photo_record_button', 5),(By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[2]/android.widget.ImageView', 5)]
# 面孔起源tab
face_ai_gene = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/face_ai_gene', 5),(By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[3]/android.view.ViewGroup/android.widget.RelativeLayout[1]/android.widget.TextView', 5)]
#测肤tab
skin_tab = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/face_ai_skin', 5),(By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[3]/android.view.ViewGroup/android.widget.RelativeLayout[3]/android.widget.TextView', 5)]
# 男性按钮
face_gene_male = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/face_gene_male', 5), (By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.widget.LinearLayout/android.widget.ImageView[2]', 5)]
#女性按钮
face_gene_female = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/face_gene_female', 5), (By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.widget.LinearLayout/android.widget.ImageView[1]', 5)]
# 模拟整形tab按钮点击
zhengxing_tab = [(By.ID,'com.wanmeizhensuo.zhensuo:id/face_ai_plastic_new',5),
(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[3]/android.view.ViewGroup/android.widget.RelativeLayout[5]/android.widget.TextView',5),
(By.XPATH,'//*[@text="模拟整形"]',5)]
# 模拟整形相册按钮点击
zhengxing_picture_button = [(By.ID,'com.wanmeizhensuo.zhensuo:id/take_photo_album_img',5),
(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[2]/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.ImageView[2]',5)]
# 测颜值tab点击
scan_tab = [(By.ID,'com.wanmeizhensuo.zhensuo:id/face_ai_analysis_tv',5),
(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[3]/android.view.ViewGroup/android.widget.RelativeLayout[3]/android.widget.TextView',5)]
# 测颜值tab点击
face_ai_plastic = [(By.ID,'com.wanmeizhensuo.zhensuo:id/face_ai_plastic',5),
(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[3]/android.view.ViewGroup/android.widget.RelativeLayout[5]/android.widget.TextView',5)]
\ No newline at end of file
from selenium.webdriver.common.by import By
# 点击首页关闭弹窗
dialog_home_img_cancel = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/dialog_home_img_cancel', 10),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.ImageView[1]',10)]
# 点击 我 按钮
me = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/main_rl_menu_personal', 5),
(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.LinearLayout/android.widget.LinearLayout[4]', 5)]
# 测颜值 icon
scan_1 = [(By.XPATH, "/hierarchy/android.widget."
"FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget."
"LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget."
"FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup"
"/android.widget.LinearLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout"
"/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/"
"android.widget.LinearLayout/androidx.recyclerview.widget.RecyclerView/android.widget.LinearLayout[5]/android.widget.ImageView", 5)]
#搜索输入框点击
search_sendkey_click = [(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.TextSwitcher/android.widget.TextView',5)]
# 首页搜索按钮点击
search_click_button = [(By.ID,'com.wanmeizhensuo.zhensuo:id/tv_search_btn',5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.TextView',5)]
# 双眼皮点击
double_eye = [(By.XPATH,'//*[@class="android.widget.TextView" and @text="模拟双眼皮"]',5),(By.XPATH,'//*[@text="模拟双眼皮"]',5)]
# 城市筛选器
city = [(By.ID,'com.wanmeizhensuo.zhensuo:id/titleBarHome_tv_city',5),(By.XPATH,'//*[@text="北京"]',5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout[1]/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.TextView',5)]
# 首页➕号点击
add_button = [(By.ID,'com.wanmeizhensuo.zhensuo:id/iv_titlrbar_right_menu_normal',5), (By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout[1]/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.ImageView',5)]
# 首页金刚区点击
home_jingang_icon = [(By.ID,'com.wanmeizhensuo.zhensuo:id/item_view',5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]/android.widget.RelativeLayout/androidx.viewpager.widget.ViewPager/android.widget.GridView/android.widget.RelativeLayout[1]',5)]
# 首页banner图点击
banner_click = [(By.ID,'com.wanmeizhensuo.zhensuo:id/img_banner',5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout[1]/android.widget.RelativeLayout[2]/android.widget.RelativeLayout/android.widget.RelativeLayout/androidx.viewpager.widget.ViewPager/android.view.ViewGroup/android.widget.ImageView',5)]
# 首页四分格模块点击
four_fotu = [(By.ID,'com.wanmeizhensuo.zhensuo:id/template4E_iv_imageA',5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout[2]/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout[1]/android.widget.ImageView[1]',5)]
# 首页顶部滑动横条功能区点击
title_hengtiao = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/ll_functional_module',5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout[1]/androidx.recyclerview.widget.RecyclerView/android.widget.LinearLayout[1]',5)]
# 底部商城按钮点击
Shooping_mall_click = [(By.ID,'com.wanmeizhensuo.zhensuo:id/main_iv_menu_welfare',5),(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.LinearLayout/android.widget.LinearLayout[2]/android.widget.RelativeLayout/android.widget.ImageView[1]',5)]
# 首页测颜值icon点击
scan = [(By.XPATH, "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout[1]/androidx.recyclerview.widget.RecyclerView/android.widget.LinearLayout[3]/android.widget.TextView", 5)
,(By.XPATH,'//*[@text="测颜值"]',5),(By.XPATH,'//*[@class="android.widget.TextView" and @text="测颜值"]',5)]
from selenium.webdriver.common.by import By
# 点击账号登录
password_login = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/tv_password_login', 5),
(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.TextView[1]', 5)]
#点击账号框
click_username = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/account_authentication_et_typeface', 5),
(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.EditText[2]',5)]
# 输入账号
sendkeys_username = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/account_authentication_et_phone_number', 5),
(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.EditText[1]',5)]
username = "17601625117"
# 输入密码
sendkeys_password = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/account_authentication_et_verify_label', 5),
(By.XPATH,
'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[2]/android.widget.EditText',
5)]
password = "3328378"
# 点击立即登录按钮
login_button = [(By.ID, 'com.wanmeizhensuo.zhensuo:id/account_authentication_tv_main', 5),
(By.XPATH,
'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[3]/android.widget.TextView[1]',
5)]
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/Users/bingyinliu/PycharmProjects/android_maidian/venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from chardet.cli.chardetect import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
#!/Users/bingyinliu/PycharmProjects/android_maidian/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('setuptools==39.1.0', 'console_scripts', 'easy_install')()
)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment