Arthur-Wu committed this file on 2024-11-27

This commit is contained in:
ieemoo 2024-11-27 18:00:09 +08:00
parent 0d74d0787b
commit 9af4fe3ef4
7 changed files with 67 additions and 95 deletions

View File

@ -18,9 +18,13 @@ def demo1120():
Broadcast completed: result=0 Broadcast completed: result=0
''' '''
# res2 = os.popen("adb shell am broadcast -a com.ieemoo.autoAction -e barcode 6971648922990").read() # res2 = os.popen("adb shell am broadcast -a com.ieemoo.autoAction -e barcode 6971648922990").read()
res2 = os.popen("adb shell am broadcast -a com.ieemoo.autoAction -e barcode 293849600000").read() goods_inputcode = '292413500442005544'
# print(res) goods_weight = '800'
print(res2) add_goods = f"adb shell am broadcast -a com.ieemoo.autoAction -e barcode {goods_inputcode}"
res2 = os.popen(add_goods).read()
add_goods_weight = f'adb shell am broadcast -a com.ieemoo.autoAction -e weight {goods_weight}'
res3 = os.popen(add_goods_weight).read()
print(f"res3: {res3}")
demo1120() demo1120()

View File

@ -293,10 +293,31 @@ class YMClientApi(object):
logging.info(f"-----------接口返回数据:{response.json()}\n\n") logging.info(f"-----------接口返回数据:{response.json()}\n\n")
return response.json() return response.json()
def traverse_the_barcode_of_the_prod(self, FP):
'''
根据商品Barcode遍历商品信息
:return:
'''
logging.info("========== [根据商品Barcode遍历商品信息] ==========")
'''
1- 遍历读取Barcode
2根据Barcode遍历请求接口
3根据Barcode查询情况回写商品信息
'''
def get_barcode_data():
import xlrd
workbook = xlrd.open_workbook(FP)
sheet = workbook.sheet_by_index(0)
first_column = []
for row in range(sheet.nrows):
first_column.append(sheet.cell_value(row, 0))
return first_column
for barcode in get_barcode_data():
logging.info(f"-----------当前Barcode为{barcode}")
if __name__ == '__main__': if __name__ == '__main__':
ymc = YMClientApi() ymc = YMClientApi(ShoppingCartMac='')
''' 01- ''' ''' 01- '''
ymc.session_start() # step1session开始 ymc.session_start() # step1session开始
Payload01 = {"action": 0, "isAnon": True} Payload01 = {"action": 0, "isAnon": True}

View File

@ -0,0 +1,37 @@
# This file is used to store the public parameters of the business system.
ADPublishingJson:
LoginPageAD: # 登录页广告
adsAreaId": 1
mediaType": 1
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
showOrder": 1
showTime": 5
PopupADAfterLogin: # 登录后弹窗广告
adsAreaId": 2
mediaType": 1
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
ShoppingCartHomepageAD: # 购物车主页广告
adsAreaId": 3
mediaType": 1
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
showOrder": 1
showTime": 5
StandbyAD: # 待机页广告
adsAreaId": 4
mediaType": 1
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
showOrder": 1
showTime": 5
ScanCodeAD: # 扫码广告
adsAreaId": 5
mediaType": 1
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
PostPaymentAD: # 支付后广告
adsAreaId": 6
mediaType": 1
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg
InvoiceAD: # 小票广告
adsAreaId": 7
mediaType": 1
mediaUrl": ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg

View File

@ -1,85 +0,0 @@
# !/usr/bin/python
# -*- coding: utf-8 -*-
# @Author:: Arthur Wu
# @Date:: 2024/11/15-14:46
# @Description::
''' 武商场景测试数据集
adsAreaId-1: 登录页广告
adsAreaId-2: 登录后弹窗广告
adsAreaId-3: 购物车主页广告
adsAreaId-4: 待机广告
adsAreaId-5: 扫码广告
adsAreaId-6: 支付后广告
adsAreaId-7: 小票广告
'''
''' 1-购物车Mac地址 '''
ShoppingCartMac = "b8:2d:28:04:c7:5c"
''' -武商会员账号 '''
VIPPhoneNumber = "17786408673"
''' -商超、门店信息
梦时代storeId: 69, marketId: 50
百圣storeId: 29, marketId: 50
'''
MarketAndStoreDetails = {"putMarketId": 50, "putStoreId": ["69"]}
''' -购物袋 '''
GoodsBagInputcode_mid = '6971648922990'
GoodsBagInputcode_max = '6971648922983'
''' -普通商品-2件 '''
NormalGoodsInputcode01 = "6925791908202" # 荆味酥糖
NormalGoodsInputcode02 = "6925303796426" # 统一番茄牛肉面
NormalGoodsInputcode03 = "6924743915848" # 乐事薯片
''' -优惠商品 '''
VipGoodsInputcode = "6922024730036" # 大白兔奶糖
VipGoodsInputcode02 = "4897114790479" # 维极熊白啤酒1L
VipGoodsInputcode03 = "4820193033335" # 巴瓦克纯麦啤酒
''' -折扣商品 '''
SaleGoodsInputCode = "9588856298051" # 濠品轩燕麦酥
''' -促销商品白名单 '''
PromotionalWhitelistGoods = {"GoodsInputcode": "9588856298051", "GoodsName": "濠品轩燕麦酥"}
''' -重量放通白名单 '''
WeightToWhitelistGoods = {"GoodsInputcode": "6922024730036", "GoodsName": "大白兔奶糖"}
''' -散称计重商品 '''
BulkGoods = {"GoodsInputcode": "2934431009517", "GoodsName": "阿克苏苹果"}
''' -计件商品 '''
PieceRateGoods = {"GoodsInputcode": "2910551005806", "GoodsName": "优选大白菜秧"}
''' 0-广告数据 '''
WuShangADDetail = [
{
"adsAreaId": 1, "mediaType": 1,
"mediaUrl": "ads/content/534ae9d7-3f65-48da-bc2e-3d5e66fe56d8.jpg",
"showOrder": 1, "showTime": 5,
},
{
"adsAreaId": 2, "mediaType": 1,
"mediaUrl": "ads/content/93e34d0e-9f4c-499b-ad8b-5741e55528b5.jpg",
},
{
"adsAreaId": 3, "mediaType": 1,
"mediaUrl": "ads/content/581ec30a-4d90-43f3-b0e9-b5c8fe0006b4.jpg",
"showOrder": 1, "showTime": 5,
},
{
"adsAreaId": 4, "mediaType": 1,
"mediaUrl": "ads/content/8c8f6de0-6eb7-4b66-98cd-2c85eb057ed5.png",
"showOrder": 1, "showTime": 5,
},
{
"adsAreaId": 5, "mediaType": 1,
"mediaUrl": "ads/content/9d5555e3-fec1-4e1a-94e7-b517f4e88aba.jpg",
},
{
"adsAreaId": 6, "mediaType": 1,
"mediaUrl": "ads/content/e2e2e892-1a81-4b0f-9af2-cb46f04a5dc4.jpg",
},
{
"adsAreaId": 7, "mediaType": 1,
"mediaUrl": "ads/content/6d9c14ca-3fd1-4fe7-b04a-84cf18937e60.jpg",
}
]

View File

@ -1,5 +0,0 @@
# !/usr/bin/python
# -*- coding: utf-8 -*-
# @Author:: Arthur Wu
# @Date:: 2024/11/18-11:49
# @Description::

View File

@ -12,4 +12,4 @@ ReportsURL: http://192.168.1.165
# 4-联测测试的商超列表: WuShang\ZhongBai\YongHui\JiajiaYue # 4-联测测试的商超列表: WuShang\ZhongBai\YongHui\JiajiaYue
MarketsArray: MarketsArray:
- ZhongBai - JiajiaYue