当前位置:网站首页>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()
边栏推荐
- [istio introduction, architecture, components]
- Troublesome problem of image resizing when using typora to edit markdown to upload CSDN
- Synchronized underlying principle, volatile keyword analysis
- Count the number of words in the string c language
- Alibaba P8 teaches you how to realize multithreading in automated testing? Hurry up and stop
- Why is access to the external network prohibited for internal services of the company?
- Golang etcdv3 reports an error. The attribute in grpc does not exist
- channel. Detailed explanation of queuedeclare parameters
- Calculation s=1+12+123+1234+12345 C language
- How to use Arthas to view class variable values
猜你喜欢
PPT模板、素材下载网站(纯干货,建议收藏)
数据在内存中的存储
Do you have any certificates with high gold content?
What is the use of PMP certificate?
Output all composite numbers between 6 and 1000
Expérience de port série - simple réception et réception de données
面板显示技术:LCD与OLED
Three updates to build applications for different types of devices | 2022 i/o key review
Markdown编辑器Editor.md插件的使用
Explain Huawei's application market in detail, and gradually reduce 32-bit package applications and strategies in 2022
随机推荐
年薪50w阿裏P8親自下場,教你如何從測試進階
How to pass the PMP Exam in a short time?
Simple use of Xray
Hard core sharing: a common toolkit for hardware engineers
硬件大熊原创合集(2022/05更新)
C language for calculating the product of two matrices
Full link voltage test of the e-commerce campaign Guide
H3C vxlan configuration
RuntimeError: Calculated padded input size per channel: (1 x 1). Kernel size: (5 x 5). Kernel size c
OpenGL 3D graphics rendering
端口复用和重映像
Panel display technology: LCD and OLED
How to count the number of project code lines
C语言指针(习题篇)
PMP certificate preparation experience sharing
MySQL master-slave delay solution
With an annual salary of 50W, Alibaba P8 will come out in person to teach you how to advance from testing
Several methods of calculating the average value of two numbers
数字三角形模型 AcWing 1027. 方格取数
Interpretation of MySQL optimization principle