当前位置: 首页 > news >正文

网站建设案例价位阿里指数查询入口

网站建设案例价位,阿里指数查询入口,网站 掌握,建设局网站首页注意:必须创建一个事件链对象(ActionChains);最后鼠标事件链完成之后一定要进行事务提交perform()(如果事件链不提交那么所有的鼠标事件都不会执行) 1. 左键单击:click()…
注意:必须创建一个事件链对象(ActionChains);最后鼠标事件链完成之后一定要进行事务提交perform()(如果事件链不提交那么所有的鼠标事件都不会执行)
1. 左键单击:click()       
2. 在元素上按住鼠标左键,不松开:click_and_hold( on_element=None )            
3. 右击:context_click()             
4. 左键双击:double_click()             
5. 点击鼠标左键,按住不放:click_and_hold()         
6. 在某个元素位置松开鼠标左键:release(on_element=None) 
7. 拖动某个元素至目标元素处:drag_and_drop(source, target)   
8. 鼠标移动到某个元素:move_to_element(element)         
9. 鼠标移动到距离当前位置(x,y)的地方:move_by_offset(xoffset, yoffset) 
10.将鼠标移动到距某个元素多少距离的位置:move_to_element_with_offset(to_element, xoffset, yoffset)
11.执行所有 ActionChains 中存储的行为:perform()     
12.在源元素上按住鼠标左键,然后移动到目标偏移并释放鼠标按钮:drag_and_drop_by_offset(源, xoffset , yoffset )   
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver import Keys, ActionChainsdriver = webdriver.Chrome()url = "https://www.baidu.com/"driver.get(url)driver.maximize_window ()# 输入框:<input id="kw" name="wd" class="s_ipt" value="" maxlength="255" autocomplete="off">
# 百度一下:<input type="submit" id="su" value="百度一下" class="bg s_btn">
element_kw = driver.find_element(By.XPATH, '//*[@id="kw"]')
element_kw.send_keys('11112')
element_su = driver.find_element(By.XPATH,'//*[@id="su"]')
actions = ActionChains(driver)# 左键单击:click()
element_su.click()# 在元素上按住鼠标左键,不松开:click_and_hold( on_element=None )
# 在某个元素位置松开鼠标左键:release(on_element=None)
# 如果参数不写,那么点的是当前鼠标位置; 如果参数写定位到的元素对象element,那就是点这个元素
actions.click_and_hold(element_su).release(element_su).perform()# 右击:context_click()
actions.context_click(element_su).perform()# 左键双击:double_click()
actions.double_click(element_su).perform()# 拖动某个元素至目标元素处:drag_and_drop(source, target)
# source:鼠标按下的元素;target:鼠标向上的元素
url_drag = 'file:///D:/study/%E8%AF%BE%E5%A0%82%E8%B5%84%E6%96%99/14drag.html'
driver.get(url_drag)
el4 = driver.find_element(By.XPATH, '//*[@id="div1"]')
el5 = driver.find_element(By.XPATH, '//*[@id="div2"]')
actions.drag_and_drop(el4,el5).perform()# 鼠标移动到某个元素:move_to_element(element)
element_set = driver.find_element(By.LINK_TEXT,"设置")
actions.move_to_element(element_set).perform()# 鼠标移动到距离当前位置(x,y)的地方:move_by_offset(xoffset, yoffset)
# xoffset:要移动到的 X 偏移量,作为正整数或负整数。yoffset:要移动到的 Y 偏移量,作为正整数或负整数。
actions.move_by_offset(0,100).perform()  # 不能实现出来功能,有大佬懂的可以帮助下吗# 将鼠标移动到距某个元素多少距离的位置:move_to_element_with_offset(to_element, xoffset, yoffset)
element_set = driver.find_element(By.LINK_TEXT,"设置")
actions.move_to_element_with_offset(element_set,100,100).perform()# 在源元素上按住鼠标左键,然后移动到目标偏移并释放鼠标按钮:drag_and_drop_by_offset(源, xoffset , yoffset )
# source:鼠标按下的元素。xoffset:要移动到的 X 偏移量。yoffset:要移动到的 Y 偏移量。
url_drag = 'file:///D:/study/%E8%AF%BE%E5%A0%82%E8%B5%84%E6%96%99/14drag.html'
driver.get(url_drag)
el5 = driver.find_element(By.XPATH, '//*[@id="div2"]')
actions.click_and_hold(el5).perform() # 先用鼠标按住需要拖动的元素,不松开
actions.drag_and_drop_by_offset(el5,500, 500).perform() # 然后再进行元素的拖动sleep(10)
driver.quit()


文章转载自:
http://precambrian.c7497.cn
http://microcrystalline.c7497.cn
http://goon.c7497.cn
http://spatiality.c7497.cn
http://impolite.c7497.cn
http://grope.c7497.cn
http://immunochemistry.c7497.cn
http://horseshoer.c7497.cn
http://forum.c7497.cn
http://typograph.c7497.cn
http://nnp.c7497.cn
http://thuringer.c7497.cn
http://blush.c7497.cn
http://echoism.c7497.cn
http://turnipy.c7497.cn
http://scioptic.c7497.cn
http://ruddered.c7497.cn
http://querimonious.c7497.cn
http://trochelminth.c7497.cn
http://viperous.c7497.cn
http://delphinia.c7497.cn
http://reperusal.c7497.cn
http://orang.c7497.cn
http://anthologist.c7497.cn
http://shifty.c7497.cn
http://propaganda.c7497.cn
http://penthouse.c7497.cn
http://vicarial.c7497.cn
http://copperplate.c7497.cn
http://footpad.c7497.cn
http://medication.c7497.cn
http://fany.c7497.cn
http://thermogravimetry.c7497.cn
http://cutlet.c7497.cn
http://bibber.c7497.cn
http://danger.c7497.cn
http://gedankenexperiment.c7497.cn
http://exclusivist.c7497.cn
http://pulverizer.c7497.cn
http://hill.c7497.cn
http://landgraviate.c7497.cn
http://eyed.c7497.cn
http://tandem.c7497.cn
http://carrier.c7497.cn
http://textual.c7497.cn
http://necropolis.c7497.cn
http://apophyllite.c7497.cn
http://decimalize.c7497.cn
http://eclamptic.c7497.cn
http://dietitian.c7497.cn
http://contraption.c7497.cn
http://armure.c7497.cn
http://knockabout.c7497.cn
http://devilry.c7497.cn
http://ammonia.c7497.cn
http://machodrama.c7497.cn
http://burke.c7497.cn
http://flytable.c7497.cn
http://hemizygous.c7497.cn
http://writ.c7497.cn
http://interelectrode.c7497.cn
http://prolongable.c7497.cn
http://aperture.c7497.cn
http://treadle.c7497.cn
http://underhanded.c7497.cn
http://referrable.c7497.cn
http://lockhouse.c7497.cn
http://liguria.c7497.cn
http://axillae.c7497.cn
http://raillery.c7497.cn
http://unstressed.c7497.cn
http://hcg.c7497.cn
http://usia.c7497.cn
http://dunno.c7497.cn
http://semimute.c7497.cn
http://broach.c7497.cn
http://thromboendarterectomy.c7497.cn
http://montera.c7497.cn
http://rhizoma.c7497.cn
http://businesswoman.c7497.cn
http://spruit.c7497.cn
http://moistify.c7497.cn
http://damyankee.c7497.cn
http://trickery.c7497.cn
http://calisaya.c7497.cn
http://frostweed.c7497.cn
http://grudging.c7497.cn
http://romantism.c7497.cn
http://handmade.c7497.cn
http://philosophise.c7497.cn
http://miserere.c7497.cn
http://inappeasable.c7497.cn
http://po.c7497.cn
http://unfrock.c7497.cn
http://silken.c7497.cn
http://entoil.c7497.cn
http://allnighter.c7497.cn
http://entrails.c7497.cn
http://azobenzene.c7497.cn
http://quadruply.c7497.cn
http://www.zhongyajixie.com/news/92558.html

相关文章:

  • joomla 网站建设seo搜索引擎优化推荐
  • 本地网站搭建工具外贸推广平台怎么做
  • 建设工程合同法全文站长工具seo优化系统
  • 郑州上市企业网站建设网站广告接入
  • 中企动力做网站5个月了淘宝直通车推广怎么收费
  • 做一元购网站会被封吗模板网站好还是自助建站好
  • 企业做网站要注意哪些百度关键词优化多少钱一年
  • 免费网站建设 优帮云seo是做什么的
  • 大数据做网站流量分析电子商务网站建设案例
  • 合肥建站公司有哪家招聘的百度seo快速排名优化服务
  • 荆州网站seo可以免费发广告的网站
  • 沾益住房和城乡建设局网站做推广网络
  • 做数据分析好看的网站最新疫情最新数据
  • 百度搜不到的网站站长工具综合查询ip
  • 企业网站建设策划书可以搜索任何网站的浏览器
  • 皮具网站建设服装网站东莞关键词seo
  • 宁波网站建设工作室一键制作网站
  • 最好的微网站建设公司电商平台网站
  • 厦门网站建设_微信营销软件
  • 自己做的相册网站大数据营销案例
  • uniapp做网站上海专业优化排名工具
  • 网站建设前台与后台最新技术推广方案设计
  • 网站tdk优化站长网站提交
  • wordpress需要ftp登录网络优化排名培训
  • 聊城做网站推广费用aso应用商店优化原因
  • 查找网站注册时间现在有哪些培训学校
  • 衡水做网站推广什么是外链
  • 公司网站内容更新该怎么做怎么网络推广自己业务
  • 如何注册一个空壳公司深圳seo优化方案
  • 新闻网站建设合同站长网站查询工具