当前位置:网站首页>Selenium code storage
Selenium code storage
2022-07-26 14:52:00 【mp1011_ one hundred and ten】
driver Method
# establish 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)# An implicit wait : Maximum waiting 8 The second time try except assert Deposit
try: # Read Popup
elements = self.driver.find_element_by_xpath(self.tanchuang_x).text
assert elements == u' New publishing resource succeeded '
print("PASS entrance : Resource details Ordinary members choose themselves "+elements)
except Exception:
print("FAIL entrance : Resource details Ordinary members choose themselves Pop up window is not displayed ") Whether optional detection
x_enabled = self.driver.find_element(By.XPATH,self.push2_x6) # Locate the push name
if x_enabled.is_enabled(): # The input box is grayed out for detection
print("FAIL: Elements are optional ")
else:
print("PASS: Element is not optional ")
self.driver.find_element(By.CSS_SELECTOR)边栏推荐
- 下一代视觉Transformer:解锁CNN和Transformer正确结合方法
- Minecraft 1.16.5 module development (52) modify the original biological trophy (lot table)
- PyTorch的简单实现
- Siamrpn: recommended regional network and twin network
- Matlab solution of [analysis of variance]
- Flask send_ Absolute path traversal caused by file function
- 【干货】MySQL索引背后的数据结构及算法原理
- Brief description of llcc68 broadcast wake-up
- JS creative range select drag and drop plug-ins
- 1.两数之和
猜你喜欢

RPN:Region Proposal Networks (区域候选网络)
Network pictures are transferred locally, causing the kernel to exit

Canvas mesh wave animation JS special effect

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

Tdengine helps Siemens' lightweight digital solution simicas simplify data processing process

AMB | towards sustainable agriculture: rhizosphere microbial engineering

键盘快捷键操作电脑(自己遇到不会的)

Summary of target tracking related knowledge

Realize the full link grayscale based on Apache APIs IX through MSE

【常微分方程求解及绘图之求解小船行走轨迹】
随机推荐
VBA 上传图片
Canvas mesh wave animation JS special effect
As the "first city" in Central China, Changsha's "talent attraction" has changed from competition to leadership
The development of smart home industry pays close attention to edge computing and applet container technology
C# Winfrom 常用功能整合
CAS based SSO single point server configuration
Transc knowledge representation model
创建Root权限虚拟环境
[Nuxt 3] (十二) 项目目录结构 1
31. Opinion-based Relational Pivoting forCross-domain Aspect Term Extraction 阅读笔记
【文件上传漏洞-06】分布式配置文件攻击实验—以upload-labs-4为例
Seata deployment and microservice integration
sp导出贴图到maya
Minecraft 1.16.5 module development (52) modify the original biological trophy (lot table)
CAS单点登录
Maya imports the model into unity
Arithmetic operation and logic operation of image in opencv
Whaledi message queue stability improvement practice
BSN IPFS(星际文件系统)专网简介、功能、架构及特性、接入说明
js 实现数字转金额价格千分符