当前位置:网站首页>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()
边栏推荐
- 硬件大熊原创合集(2022/05更新)
- Do you have any certificates with high gold content?
- STM32串口寄存器库函数配置方法
- Panel display technology: LCD and OLED
- 【ChaosBlade:节点磁盘填充、杀节点上指定进程、挂起节点上指定进程】
- PMP Exam Preparation experience, seek common ground while reserving differences, and successfully pass the exam
- How long does the PMP usually need to prepare for the exam in advance?
- Several methods of calculating the average value of two numbers
- Output a spiral matrix C language
- UnityShader入门精要个人总结--基础篇(一)
猜你喜欢
面试题:高速PCB一般布局、布线原则
Upgrade Alibaba cloud RDS (relational database service) instance to com mysql. jdbc. exceptions. Troubleshooting of jdbc4.communicationsexception
Reflections on the way of enterprise IT architecture transformation (Alibaba's China Taiwan strategic thought and architecture practice)
Output all composite numbers between 6 and 1000
Reading notes of pyramid principle
使用Typora编辑markdown上传CSDN时图片大小调整麻烦问题
PPT模板、素材下载网站(纯干货,建议收藏)
UnityShader入门精要个人总结--基础篇(一)
On December 8th, 2020, the memory of marketing MRC application suddenly increased, resulting in system oom
Explain Huawei's application market in detail, and gradually reduce 32-bit package applications and strategies in 2022
随机推荐
Port occupation troubleshooting
阿里p8手把手教你,自动化测试应该如何实现多线程?赶紧码住
JVM garbage collection detailed learning notes (II)
数据在内存中的存储
Analysis of Hessian serialization principle
[chaosblade: node CPU load, node network delay, node network packet loss, node domain name access exception]
How to use Arthas to view class variable values
Troublesome problem of image resizing when using typora to edit markdown to upload CSDN
实现自定义内存分配器
Unityshader introduction essentials personal summary -- Basic chapter (I)
【Istio Network CRD VirtualService、Envoyfilter】
PMP examination experience sharing
Several methods of calculating the average value of two numbers
平台化,强链补链的一个支点
Test pits - what test points should be paid attention to when adding fields to existing interfaces (or database tables)?
Count the number of words in the string c language
Hard core sharing: a common toolkit for hardware engineers
徽商期货公司评级是多少?开户安全吗?我想开户,可以吗?
Full link voltage test of the e-commerce campaign Guide
Analysis of abnormal channel number information before and after AGC re signature service