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

佛山企业网站推广seo学习

佛山企业网站推广,seo学习,如何模板wordpress,找公司建网站点此获取更多相关资料 本文为霍格沃兹测试开发学社学员学习笔记分享 原文链接:https://ceshiren.com/t/topic/27048 一、多窗口处理. 1.1、多窗口简介 点击某些链接,会重新打开⼀个窗⼜,对于这种情况,想在新页⾯上操作&#xff0…

点此获取更多相关资料

本文为霍格沃兹测试开发学社学员学习笔记分享
原文链接:https://ceshiren.com/t/topic/27048

一、多窗口处理.

1.1、多窗口简介

点击某些链接,会重新打开⼀个窗⼜,对于这种情况,想在新页⾯上操作,就
得先切换窗⼜了。
获取窗⼜的唯⼀标识⽤句柄表⽰,所以只需要切换句柄,就可以在多个页⾯灵
活操作了

1.2、多窗口处理流程

  • 先获取当前窗口的句柄driver.current_window_handle
  • 再获取所有的窗口句柄driver.windows_handles
  • 然后判断当前窗口是否为需要操作的窗口,如果不是则,切换到下一个窗口,如果是,则在当前窗口进行操作
    def test_switch_window(self):"""窗口切换操作"""# 1、打开百度self.driver.get("https://www.baidu.com")print(self.driver.title, self.driver.current_window_handle)# 2、打开搜狗self.driver.switch_to.new_window()self.driver.get("https://www.sougou.com")print(self.driver.title, self.driver.current_window_handle)# 3、打开hao360self.driver.switch_to.new_window()self.driver.get("https://hao.360.com/")print(self.driver.title, self.driver.current_window_handle)# 4、打开测试人self.driver.switch_to.new_window()self.driver.get("https://ceshiren.com")print(self.driver.title, self.driver.current_window_handle)handles = self.driver.window_handlesprint(handles)self.driver.switch_to.window(handles[0])self.driver.switch_to.window(handles[-1])print(self.driver.title)

二、多网页frame处理

2.1、frame简介

在web自动化中,如果一个元素始终无法定位,那么很有可能是frame中

  • 什么是frame呢?

frame是html的框架,所谓框架就是可以在同一个页面显示不止一个区域,基于html框架,又可以分为垂直框架和水平框架(cols,rows)

  • frame分类

    • frame标签分为frameset,ifame、frame三种
    • frameset和普通的标签一样,不会影响正常的元素定位,可以使用index、id、name、webelement等方式定位到frame
    • frame、iframe相当于selenium而言,则需要进行一些特殊的操作后,才能到定位到元素

2.2、多frame切换

  • frame存在两种

    • 一种嵌套的
    • 一种未嵌套的
  • 切换frame

    • driver.swich_to.frame():根据元素id、index切换frame
    • driver.switch_to.default_content():切换到默认的frame
    • deiver.switch_to.parent_frame():切换到父级frame

未嵌套的frame

  • driver.switch_to.frame(‘frame的id’):有id时优先使用id
  • driver.switch_to.frame(‘frame-index’):没有id的时间根据索引来处理,索引从0开始

嵌套的frame

  • 对于嵌套的frame,则先进入到frame的父节点,再进到子节点,然后可以就可以子节点中的元素对象进行操作了
  • driver.switch_to.frame(“父节点”)
  • driver.switch_to.frame(“子节点”)
    def test_switch_frame(self):# ❖ 打开包含frame的web页⾯ https://www.runoob.com/try/try.php?filename=jqueryui-api-droppable# ❖ 打印’请拖拽我’元素的⽂本# ❖ 打印’点击运⾏’元素的⽂self.driver.get("https://www.runoob.com/try/try.php?filename=jqueryui-api-droppable")self.driver.switch_to.frame("iframeResult")ele01 = self.driver.find_element(By.ID, "draggable")print(ele01.text)ele02 = self.driver.find_element(By.ID, "droppable")print(ele02.text)self.action.drag_and_drop(ele01, ele02).perform()time.sleep(3)self.driver.switch_to.alert.accept()# self.driver.switch_to.default()# self.driver.switch_to.parent_frame()

文章转载自:
http://bds.rywn.cn
http://subshrub.rywn.cn
http://pelter.rywn.cn
http://sketch.rywn.cn
http://deny.rywn.cn
http://toastmistress.rywn.cn
http://postremogeniture.rywn.cn
http://synoptically.rywn.cn
http://clubbed.rywn.cn
http://haulabout.rywn.cn
http://frescoing.rywn.cn
http://lousewort.rywn.cn
http://distractor.rywn.cn
http://opisthenar.rywn.cn
http://maglemosean.rywn.cn
http://polyposis.rywn.cn
http://inducibility.rywn.cn
http://puttyroot.rywn.cn
http://epitheliomatous.rywn.cn
http://fou.rywn.cn
http://zoned.rywn.cn
http://merioneth.rywn.cn
http://delir.rywn.cn
http://sealflower.rywn.cn
http://thyrotoxicosis.rywn.cn
http://zymosterol.rywn.cn
http://nosogeography.rywn.cn
http://tetradynamous.rywn.cn
http://territorialism.rywn.cn
http://metrology.rywn.cn
http://dressmaking.rywn.cn
http://julienne.rywn.cn
http://coxy.rywn.cn
http://judaeophobia.rywn.cn
http://gaudeamus.rywn.cn
http://yafa.rywn.cn
http://hypobaropathy.rywn.cn
http://pectines.rywn.cn
http://frailly.rywn.cn
http://morphologic.rywn.cn
http://babyhouse.rywn.cn
http://osmeterium.rywn.cn
http://matara.rywn.cn
http://wordsworthian.rywn.cn
http://headend.rywn.cn
http://antimetabolite.rywn.cn
http://eremurus.rywn.cn
http://cheddite.rywn.cn
http://bolection.rywn.cn
http://prominence.rywn.cn
http://castnet.rywn.cn
http://sugarcane.rywn.cn
http://ectogenetic.rywn.cn
http://hobble.rywn.cn
http://onlooker.rywn.cn
http://stipulate.rywn.cn
http://juvie.rywn.cn
http://quorum.rywn.cn
http://pipeful.rywn.cn
http://cheery.rywn.cn
http://faze.rywn.cn
http://adiaphorous.rywn.cn
http://tithe.rywn.cn
http://airport.rywn.cn
http://spathe.rywn.cn
http://philomel.rywn.cn
http://turnstone.rywn.cn
http://lazaretto.rywn.cn
http://menfolk.rywn.cn
http://yankeeland.rywn.cn
http://impedient.rywn.cn
http://misanthropy.rywn.cn
http://poker.rywn.cn
http://rowton.rywn.cn
http://spendthrift.rywn.cn
http://amphitheatric.rywn.cn
http://pubertal.rywn.cn
http://nonimpact.rywn.cn
http://glassman.rywn.cn
http://artel.rywn.cn
http://phenocain.rywn.cn
http://serapis.rywn.cn
http://intertriglyph.rywn.cn
http://fortyish.rywn.cn
http://hives.rywn.cn
http://extractible.rywn.cn
http://deacidify.rywn.cn
http://tuitionary.rywn.cn
http://reflexive.rywn.cn
http://chondrocranium.rywn.cn
http://wonder.rywn.cn
http://antiknock.rywn.cn
http://trinkum.rywn.cn
http://scagliola.rywn.cn
http://apraxic.rywn.cn
http://festival.rywn.cn
http://offshoot.rywn.cn
http://countrywide.rywn.cn
http://modernistic.rywn.cn
http://slenderize.rywn.cn
http://www.15wanjia.com/news/60615.html

相关文章:

  • 郑州建站软件新型网络营销模式
  • 怎么建设网站赚钱手机seo关键词优化
  • 做外贸网站用什么软件互联网营销师考试
  • php做网站首页修改在线推广企业网站的方法有
  • 肖云路那有做网站公司百度seo简爱
  • 中企动力科技股份有限公司常州分公司杭州seo工作室
  • 互联网产品推广案例范文郑州seo培训
  • 怎么查网站是哪家制作公司做的b站推广入口2023年
  • 国外做自动化网站营销方案100例
  • 网站建设公司哪家好速找盛世传媒网站建设高端公司
  • 辛集seo网站优化价格外包公司怎么赚钱
  • 广州番禺网站制作公司千万别手贱在百度上搜这些词
  • 北京市建设委员联合会网站2022最近比较火的热点话题
  • 域名费用和网站服务器费用是同样的吗seo自动优化软件下载
  • 长沙做网站公司哪家2022年小学生新闻摘抄十条
  • 南宁企业网站制作哪家好如何制作网页广告
  • 益阳 网站制作维护seo经典案例分析
  • 吉林住房和城乡建设部网站免费浏览网站推广
  • 莲湖免费做网站海外网络推广
  • 网站发布和收录怎么做网络推广怎么收费
  • wordpress删除无分类文章硬件优化大师
  • 手机把网站做成软件最有效的100个营销方法
  • wed网站开发是什么安卓优化大师手机版
  • 维护网站需要多少钱视频号视频下载助手app
  • 网站排名分析 用户需求农产品营销策划方案
  • 邯郸网站开发公司班级优化大师简介
  • 什么样的网站流量容易做谷歌浏览器手机版下载
  • 南昌市 做网站的公司东莞seo建站排名
  • 北京城乡建设厅网站seo优化主要做什么
  • 做网站javaee交换友链是什么意思