-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkingkong.py
More file actions
26 lines (24 loc) · 857 Bytes
/
Copy pathkingkong.py
File metadata and controls
26 lines (24 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get('https://service.security.tencent.com/kingkong')
print(driver.title)
#assert "Python" in driver.title
#driver.find_element_by_name("uploadfile").click()
apkpath='D:\研一\爬虫\selenium\\apk'
files=os.listdir(apkpath)
for file in files:
abname='D:\研一\爬虫\selenium\\apk\\'+file
print(abname)
driver.find_element_by_name("uploadfile").click()
os.system('D:\研一\爬虫\selenium\\auto.exe %s' % abname)
sleep(2)
md5=driver.find_element_by_xpath('//*[@id="apk_modal"]/div[2]/div[1]/div[2]').text
print(md5)
driver.find_element_by_xpath('//*[@id="apk_modal"]/div[3]/button').click()
sleep(1)
# elem.clear()
# elem.send_keys("pycon")
# elem.send_keys(Keys.RETURN)