Skip to content

Commit 51395ae

Browse files
committed
ui
1 parent 7755926 commit 51395ae

File tree

13 files changed

+87
-31
lines changed

13 files changed

+87
-31
lines changed

.DS_Store

0 Bytes
Binary file not shown.

ProjectConfig/.DS_Store

0 Bytes
Binary file not shown.

ProjectConfig/CmdDefault/.DS_Store

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
#! /bin/sh
3+
# 脚本文件的绝对路径存在了环境变量filepath中,可以用
4+
filepath=$(cd "$(dirname "$0")"; pwd)
5+
6+
# VMware 虚拟机共享目录里路径带空格 需要转换处理
7+
str1=$filepath
8+
str2="VMware"
9+
if [[ $str1 =~ $str2 ]]
10+
then
11+
echo "包含"
12+
#去除带空格的路径
13+
#filepath=${filepath// /\\ }
14+
filepath=${filepath#/Volumes/VMware Shared Folders/}
15+
cd /Volumes/VMware\ Shared\ Folders
16+
else
17+
echo "不包含"
18+
fi
19+
20+
21+
echo $filepath
22+
cd $filepath
23+
cd ../../../../../../../Common/PythonUnity/ProjectConfig/Script
24+
python3 ProjectManager.py $filepath CopyConfig
25+
26+
if [[ $str1 =~ $str2 ]]
27+
then
28+
cd /Volumes/VMware\ Shared\ Folders
29+
else
30+
echo "不包含"
31+
fi
32+
33+
cd $filepath
34+
cd ../../../../../../../Common/PythonUnity/ProjectConfig/Script
35+
python3 AdManager.py $filepath adinfo ios baidu hd
36+

ProjectConfig/Script/Ad/AdBaidu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ def CreateApp(self, isHD):
496496
# self.CreatePlaceId(isHD)
497497

498498

499-
def GetAppName(self, ishd):
499+
def GetAppName(self, ishd):
500500
name = mainAppInfo.GetAppName(self.osApp, ishd,Source.LANGUAGE_CN)
501501
return name
502502

ProjectConfig/Script/Ad/AdGdt.py

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ def Init(self):
151151
def Quit(self):
152152
self.driver.quit()
153153

154+
# apk_sign_key.jks
155+
# keytool -v -list -keystore /Users/moon/sourcecode/unity/product/Common/project_android/game/src/main/apk_sign_key.jks qianlizhiwai
156+
# SHA1: F2:52:EF:13:E7:4E:2A:96:B6:52:2F:F8:96:8E:7B:0C:04:98:E6:30
157+
# <input type="text" class="size-410 spaui-input has-normal spaui-component" placeholder="请填写正确的 SHA1 值,否则会影响广告返回" value="" name="" data-spaui="{}">
158+
# <input type="text" class="size-410 spaui-input has-normal spaui-component" placeholder="输入的包名必须与广告请求包名一致,否则会影响收益" value="" name="" data-spaui="{}">
154159
# 3452644866 qq31415926
155160
def CreateApp(self, isHD):
156161
self.driver.get("https://adnet.qq.com/medium/add")
@@ -231,10 +236,7 @@ def CreateApp(self, isHD):
231236
list[3].click()
232237

233238
# url
234-
item = self.driver.find_element(
235-
By.XPATH, "//input[@class='form-control size-410 form-control']")
236-
237-
239+
238240
url = ""
239241
if self.osApp == Source.ANDROID:
240242
if appChannel == Source.TAPTAP:
@@ -249,30 +251,51 @@ def CreateApp(self, isHD):
249251
# https://itunes.apple.com/cn/app/id1303020002
250252
# https://apps.apple.com/cn/app/id668407890
251253
url = "https://apps.apple.com/cn/app/id"+appid
252-
253-
item.send_keys(url)
254+
255+
key = "//input[contains(@placeholder,'详情页地址')]"
256+
webcmd.AddCmd(CmdType.INPUT, key, url)
257+
258+
259+
# sha1
260+
key = "//input[contains(@placeholder,'请填写正确的 SHA1')]"
261+
sha1 = "F2:52:EF:13:E7:4E:2A:96:B6:52:2F:F8:96:8E:7B:0C:04:98:E6:30"
262+
webcmd.AddCmd(CmdType.INPUT, key, sha1)
263+
264+
key = "//input[contains(@placeholder,'输入的包名必须与广告请求包名一致')]"
265+
package = mainAppInfo.GetAppPackage(Source.ANDROID,isHD,appChannel)
266+
webcmd.AddCmd(CmdType.INPUT, key, package)
267+
254268

255269
# name
256-
name = self.GetAppName(isHD)
257-
list = self.driver.find_elements(
258-
By.XPATH, "//input[@id='placementName']")
259-
list[0].send_keys(name)
270+
name = self.GetAppName(isHD,appChannel)
271+
key = "//input[@id='placementName']"
272+
webcmd.AddCmd(CmdType.INPUT, key, name)
260273

261-
list = self.driver.find_elements(
262-
By.XPATH, "//input[@id='placementName']")
263-
list[1].send_keys(name)
264-
265-
item = self.driver.find_element_by_id('formControlsTextarea')
266-
name += name
267-
name += name
268-
name += name
269-
name += name
270-
item.send_keys(name)
271274

272-
item = self.driver.find_element(
273-
By.XPATH, "//input[@id='packageName']")
274-
package = mainAppInfo.GetPackage(Source.ANDROID, isHD)
275-
item.send_keys(package)
275+
# 创建
276+
key = "//a[text()='创建']"
277+
webcmd.AddCmd(CmdType.CLICK, key)
278+
279+
webcmd.Run(True)
280+
281+
282+
283+
284+
# list = self.driver.find_elements(
285+
# By.XPATH, "//input[@id='placementName']")
286+
# list[1].send_keys(name)
287+
288+
# item = self.driver.find_element_by_id('formControlsTextarea')
289+
# name += name
290+
# name += name
291+
# name += name
292+
# name += name
293+
# item.send_keys(name)
294+
295+
# item = self.driver.find_element(
296+
# By.XPATH, "//input[@id='packageName']")
297+
# package = mainAppInfo.GetPackage(Source.ANDROID, isHD)
298+
# item.send_keys(package)
276299

277300
# key = "//button[@id='spaui-uploader_2-empty']"
278301
# webcmd.AddCmd(CmdType.CLICK_Action,key)
@@ -281,14 +304,10 @@ def CreateApp(self, isHD):
281304
# self.OpenFileBrowser()
282305
# time.sleep(2)
283306

284-
# 创建
285307

286-
item = self.driver.find_element(
287-
By.XPATH, "//a[@class='btn btn-primary btn-160']")
288-
item.click()
289308

290-
def GetAppName(self, ishd):
291-
name = mainAppInfo.GetAppName(self.osApp, ishd,Source.LANGUAGE_CN)
309+
def GetAppName(self, ishd,channel=""):
310+
name = mainAppInfo.GetAppName(self.osApp, ishd,Source.LANGUAGE_CN,channel)
292311
# if self.osApp == Source.IOS:
293312
# AppInfo.GetAppName(self.osApp, ishd)+self.osApp
294313

0 Bytes
Binary file not shown.
103 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)