#引入模块
#coding=utf-8
# import pytest
import sys
from sys import path
path.append(r'D:\trunk\cases\citymeia965')
from selenium import webdriver
import time
import os
from Resources.basic.basic import findItem,swipeUpPop
import jenkins
import json
path = 'C:\\Users\\jstv\\Downloads'
for i in os.listdir(path):
path_file = os.path.join(path, i)
if os.path.isfile(path_file):
os.remove(path_file)
else:
for f in os.listdir(path_file):
path_file2 = os.path.join(path_file, f)
if os.path.isfile(path_file2):
os.remove(path_file2)
if len(sys.argv)>1:
data= sys.argv[1]
assert (data != "https://www.pgyer.com/~1,-1"), "打包未成功!!!打包未成功!!!打包未成功!!!"
if str(data).startswith('https'):#请求url
time.sleep(1)
driver = webdriver.Chrome()
time.sleep(1)
python+selenium+chromedriver.exe,web自动化测试demo;接入jenkins传入的下载url
最新推荐文章于 2024-04-23 22:45:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)