当前位置:网站首页>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)边栏推荐
- llcc68广播唤醒简单说明
- Kubernetes----Pod配置资源配额
- unity透明通道的小技巧
- 【整数规划】
- [dry goods] data structure and algorithm principle behind MySQL index
- 10 schemes to ensure interface data security
- median filter
- 【文件上传漏洞-06】分布式配置文件攻击实验—以upload-labs-4为例
- My creation Anniversary - from the heart
- [solution of ordinary differential equation and drawing solution of small boat walking track]
猜你喜欢

PyTorch的简单实现

中部“第一城”,长沙“人才引力”从争先到领先

【文件上传漏洞-06】分布式配置文件攻击实验—以upload-labs-4为例

【方差分析】之matlab求解

What is the transport layer protocol tcp/udp???
![[1.2. return and risk of investment]](/img/61/0135c429225e1c18705749a20e2a96.png)
[1.2. return and risk of investment]

Simple implementation of pytorch
![[solution of ordinary differential equation and drawing solution of small boat walking track]](/img/2d/3fd7e23fdbd0f343e740a5b93bf9d9.png)
[solution of ordinary differential equation and drawing solution of small boat walking track]

C common function integration

JS creative range select drag and drop plug-ins
随机推荐
【无标题】
Leetcode summary
填问卷,领奖品 | 诚邀您填写 Google Play Academy 活动调研问卷
2. 两数相加
Introduction to C language must brush the daily question of the collection of 100 questions (1-20)
保证接口数据安全的10种方案
SP export map to Maya
目标跟踪相关知识总结
Difference between filter and interceptor
[ostep] 03 virtualized CPU - restricted direct execution mechanism
【整数规划】
My creation Anniversary - from the heart
leetcode汇总
winscp传输文件和VNC连接问题
Lingo软件的使用
Sqldeveloper tools quick start
Pdf translation, which translation company in Beijing is good
Siamrpn++: evolution of deep network connected visual tracking
[integer programming]
【文件上传漏洞-06】分布式配置文件攻击实验—以upload-labs-4为例