当前位置:网站首页>selenium 代码存放
selenium 代码存放
2022-07-26 14:33:00 【mp1011_110】
driver方法
# 创建driver
chrome_options = Options()
chrome_options.page_load_strategy = 'eager'
self.driver = webdriver.Chrome(options=chrome_options)
self.start_time = datetime.datetime.now()
self.driver.implicitly_wait(10)# 隐式等待:最大等待8秒的时间try except assert 存放
try: # 读取弹窗
elements = self.driver.find_element_by_xpath(self.tanchuang_x).text
assert elements == u'新建发布资源成功'
print("PASS 入口:资源详情 普通成员选自己"+elements)
except Exception:
print("FAIL 入口:资源详情 普通成员选自己 未显示弹窗") 是否可选检测
x_enabled = self.driver.find_element(By.XPATH,self.push2_x6) # 定位推送名称
if x_enabled.is_enabled(): # 输入框置灰检测
print("FAIL:元素可选")
else:
print("PASS:元素不可选")
self.driver.find_element(By.CSS_SELECTOR)边栏推荐
- Transc knowledge representation model
- 如何做 APP 升级测试 ?
- 全校软硬件基础设施一站式监控 ,苏州大学以时序数据库替换 PostgreSQL
- GOM login configuration free version generate graphic tutorial
- Unity学习笔记–无限地图
- 填问卷,领奖品 | 诚邀您填写 Google Play Academy 活动调研问卷
- Instructions for various interfaces of hand-held vibrating wire collector vh03
- 『SignalR』.NET使用 SignalR 进行实时通信初体验
- [Nuxt 3] (十二) 项目目录结构 1
- 31. Opinion based relational pivoting forcross domain aspect term extraction reading notes
猜你喜欢

《MySQL高级篇》五、InnoDB数据存储结构

Some lightweight network models in detection and segmentation (share your own learning notes)

One stop monitoring of the software and hardware infrastructure of the whole university, and Suzhou University replaces PostgreSQL with time series database

基于CAS的SSO单点客户端配置

Fill in the questionnaire and receive the prize | we sincerely invite you to fill in the Google play academy activity survey questionnaire

Classic line style login interface

When AI encounters life and health, Huawei cloud builds three bridges for them

maya将模型导入到unity

As the "first city" in Central China, Changsha's "talent attraction" has changed from competition to leadership
Network pictures are transferred locally, causing the kernel to exit
随机推荐
OpenCV中图像算术操作与逻辑操作
winscp传输文件和VNC连接问题
4 kinds of round head arrangement styles overlay styles
VP视频结构化框架
Tips for unity transparent channel
【愚公系列】2022年7月 Go教学课程 017-分支结构之IF
URL的使用下载资源
C# Winfrom 常用功能整合
中值滤波器
『云原生』KubeSphere可插拔组件之DevOps系统
C语言入门必刷100题合集之每日一题(1-20)
sp导出贴图到maya
Realize the full link grayscale based on Apache APIs IX through MSE
Iscc2021 lock problem solution
What is the problem of the time series database that has been developed for 5 years?
Lingo软件的使用
Kubernetes ---- pod configuration resource quota
如何做 APP 升级测试 ?
The development of smart home industry pays close attention to edge computing and applet container technology
UDP multithreaded online chat