当前位置:网站首页>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()

边栏推荐
- 测试人一定要会的技能:selenium的三种等待方式解读,清晰明了
- 徽商期货公司评级是多少?开户安全吗?我想开户,可以吗?
- JVM 垃圾回收 详细学习笔记(二)
- C语言指针(特别篇)
- Systick滴答定时器
- How does the project manager write the weekly summary and weekly plan?
- Unity shader beginner's Essentials (I) -- basic lighting notes
- Golang etcdv3 reports an error. The attribute in grpc does not exist
- 年薪50w阿里P8亲自下场,教你如何从测试进阶
- Explain Huawei's application market in detail, and gradually reduce 32-bit package applications and strategies in 2022
猜你喜欢

Platformization, a fulcrum of strong chain complementing chain

Troublesome problem of image resizing when using typora to edit markdown to upload CSDN

LeetCode 715. Range 模块

What is the use of PMP certificate?

Full link voltage test of the e-commerce campaign Guide

平台化,强链补链的一个支点

Systick滴答定时器

External interrupt to realize key experiment

Unityshader introduction essentials personal summary -- Basic chapter (I)

STM32的时钟系统
随机推荐
Original collection of hardware bear (updated on June 2022)
go mod module declares its path as: gtihub. com/xxx-xx but was required as:xx-xx
PMP certificate preparation experience sharing
How to realize sliding operation component in fast application
2022-07-06 unity core 9 - 3D animation
面板显示技术:LCD与OLED
Troublesome problem of image resizing when using typora to edit markdown to upload CSDN
Enterprise manager cannot connect to the database instance
Explain Huawei's application market in detail, and gradually reduce 32-bit package applications and strategies in 2022
Skills that testers must know: Selenium's three waiting ways are interpreted clearly
C语言指针(上篇)
H3C vxlan configuration
Synchronized underlying principle, volatile keyword analysis
Serial port experiment - simple data sending and receiving
Leetcode question brushing record (array) combination sum, combination sum II
[chaosblade: node disk filling, killing the specified process on the node, suspending the specified process on the node]
面试题:高速PCB一般布局、布线原则
硬核分享:硬件工程师常用工具包
Original collection of hardware bear (updated on May 2022)
【ChaosBlade:节点 CPU 负载、节点网络延迟、节点网络丢包、节点域名访问异常】