当前位置:网站首页>Selenium mouse sliding operation event
Selenium mouse sliding operation event
2022-07-07 09:08:00 【Song_ Lun】
selenium Mouse operation events Slide the mouse over the control to display the drop-down data
ActionChains
import time
from selenium import webdriver
from selenium.webdriver import ActionChains
def xuanting():
""" Baidu mouse moves to display drop-down data :return: """
driver = webdriver.Chrome()
driver.get('https://www.baidu.com/')
driver.maximize_window()
hover_element = driver.find_element_by_css_selector('#s-top-left > div > a')
ActionChains(driver).move_to_element(hover_element).perform()
xuan = driver.find_element_by_css_selector(
'#s-top-more > div.s-top-more-content.row-2.clearfix > a:nth-child(4) > img')
time.sleep(10)
xuan.click()
driver.quit()
if __name__ == '__main__':
xuanting()

边栏推荐
- STM32的时钟系统
- What is the use of PMP certificate?
- 【ChaosBlade:根据标签删除POD、Pod 域名访问异常场景、Pod 文件系统 I/O 故障场景】
- Chaosblade: introduction to chaos Engineering (I)
- Simulation volume leetcode [general] 1706 Where does the ball meet
- 测试人一定要会的技能:selenium的三种等待方式解读,清晰明了
- ESP32-ULP协处理器低功耗模式RTC GPIO中断唤醒
- Golang etcdv3 reports an error. The attribute in grpc does not exist
- E-commerce campaign Guide
- STM32串口寄存器库函数配置方法
猜你喜欢

How to use Arthas to view class variable values

Reflections on the way of enterprise IT architecture transformation (Alibaba's China Taiwan strategic thought and architecture practice)

PPT模板、素材下载网站(纯干货,建议收藏)

Screen automatically generates database documents

Synchronized underlying principle, volatile keyword analysis

寄存器地址名映射

【Istio Network CRD VirtualService、Envoyfilter】

硬核分享:硬件工程师常用工具包

JVM 内存结构 详细学习笔记(一)

阿里p8推荐,测试覆盖率工具—Jacoco,实用性极佳
随机推荐
PMP Exam Preparation experience, seek common ground while reserving differences, and successfully pass the exam
JVM 垃圾回收 详细学习笔记(二)
如何统计项目代码行数
STM32 clock system
What is the rating of Huishang futures company? Is it safe to open an account? I want to open an account, OK?
Leetcode刷题记录(数组)组合总和、组合总和 II
模拟卷Leetcode【普通】1567. 乘积为正数的最长子数组长度
Reflections on the way of enterprise IT architecture transformation (Alibaba's China Taiwan strategic thought and architecture practice)
C语言指针(特别篇)
LeetCode 715. Range 模块
What is the value of getting a PMP certificate?
PMP Exam Preparation experience systematically improve project management knowledge through learning
GoLand set goproxy
[istio introduction, architecture, components]
Register address name mapping
Original collection of hardware bear (updated on June 2022)
RuntimeError: Calculated padded input size per channel: (1 x 1). Kernel size: (5 x 5). Kernel size c
Analysis of abnormal channel number information before and after AGC re signature service
Nanjing commercial housing sales enabled electronic contracts, and Junzi sign assisted in the online signing and filing of housing transactions
Hard core sharing: a common toolkit for hardware engineers