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

品牌家具排行榜前十名天津放心站内优化seo

品牌家具排行榜前十名,天津放心站内优化seo,网址搭建wordpress,模板网站修改教程视频1. 前言 本文将详细介绍如何使用AirtestIDE驱动Firefox测试,以及脱离AirtestIDE怎么驱动Firefox(VScode为例)。看完本文零基础小白也能学会Firefox浏览器自动化测试!!! 2. 如何使用AirtestIDE驱动Firefox…

1. 前言

本文将详细介绍如何使用AirtestIDE驱动Firefox测试,以及脱离AirtestIDE怎么驱动Firefox(VScode为例)。看完本文零基础小白也能学会Firefox浏览器自动化测试!!!

2. 如何使用AirtestIDE驱动Firefox浏览器

对于Web自动化测试,目前AirtestIDE支持chrome浏览器和Firefox2种浏览器,今天我们重点聊一下,如何使用AirtestIDE驱动Firefox浏览器。

1)基础知识

AirtestIDE内置python环境,环境里面装好了Airtest-Selenium库,是基于Selenium封装的。GeckoDriver是与Firefox浏览器配合使用的驱动程序,安装GeckoDriver需要注意两者的版本兼容,请查看 https://github.com/mozilla/geckodriver/releases 。详细步骤参考下文:

2)下载GeckoDriver(注意选择对应操作系统的版本)

3)解压获得geckodriver.exe

解压刚才下载的文件,得到geckodriver.exe 。

4)给geckodriver.exe设置为系统环境变量

把geckodriver.exe放到你电脑某个目录下,之后给它设置系统环境变量:

5)在AirtestIDE驱动Firefox做简单的自动化测试

动图封面

# -*- encoding=utf8 -*-from airtest.core.api import *
from airtest.cli.parser import cli_setup
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from airtest_selenium.proxy import WebFirefox
import time#创建Chrome浏览器驱动实例
browser = WebFirefox(firefox_binary=r"C:\Program Files\MozillaFirefox\firefox.exe")# 访问网页
browser.get('https://www.baidu.com')#打印页面标题
print(browser.title)#休眠3秒
time.sleep(3)#关闭浏览器
browser.quit()

① 版本说明

【AirtestIDE】1.2.15:https://airtest.netease.com/changelog.html【python】3.6.5:AirtestIDE内置【Firefox】113.0.2 (64 位)【geckodriver】0.33.0(win64):https://github.com/mozilla/geckodriver/releases/tag/v0.33.0

② 启动报错

在运行上述demo时,一开始遇到了一个类似这样的报错:

selenium.common.exceptions.WebDriverException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

查询后发现,是找不到Firefox可执行文件的意思,于是在创建WebFirefox时,将firefox.exe可执行文件路径当做参数传递给WebFirefox,之后就可以正常运行了。

3. 如何脱离AirtestIDE驱动Firefox(vscode为例)

1)前置条件:安装VScode、配置python环境

2)python配置airtest、airtest-selenium

可参考:如何部署本地python环境使用命令如下:

pip install airtestpip install airtest-selenium

小编的pip版本太旧了,还需更新pip,使用命令:python -m pip install --upgrade pip

3)在cmd控制台测试环境是否配置成功

4)测试脚本demo,解决报错

① No module named pynput

缺少 pynput库,直接 pip install安装上即可。

② TypeError: init() got an unexpected keyword argument......

Ctrl+鼠标左键到proxy.py文件;出现 argument 'timeout'报错的话删掉timeout=timeout的参数;出现argument 'firefox_options'报错的话删掉firefox_options=firefox_options的参数。

5)脱离AirtestIDE驱动Firefox

4. 小结

今天关于驱动Firefox的教程就到这里啦,更多关于Airtest想看的内容,可以给我们评论/留言。

最后感谢每一个认真阅读我文章的人,礼尚往来总是要有的,虽然不是什么很值钱的东西,如果你用得到的话可以直接拿走:

在这里插入图片描述

这些资料,对于【软件测试】的朋友来说应该是最全面最完整的备战仓库,这个仓库也陪伴上万个测试工程师们走过最艰难的路程,希望也能帮助到你!   


文章转载自:
http://butler.bbrf.cn
http://inversion.bbrf.cn
http://bathysphere.bbrf.cn
http://approbatory.bbrf.cn
http://mercurian.bbrf.cn
http://supervene.bbrf.cn
http://palmerworm.bbrf.cn
http://caddish.bbrf.cn
http://congener.bbrf.cn
http://bubblehead.bbrf.cn
http://pergola.bbrf.cn
http://shelleyesque.bbrf.cn
http://telecommute.bbrf.cn
http://galactagogue.bbrf.cn
http://tristearin.bbrf.cn
http://hydronic.bbrf.cn
http://oleoresin.bbrf.cn
http://pitman.bbrf.cn
http://bacchanalian.bbrf.cn
http://caressing.bbrf.cn
http://turnscrew.bbrf.cn
http://righteous.bbrf.cn
http://convictively.bbrf.cn
http://bumblepuppy.bbrf.cn
http://lammie.bbrf.cn
http://benzal.bbrf.cn
http://peyton.bbrf.cn
http://situs.bbrf.cn
http://vizcacha.bbrf.cn
http://ingravescence.bbrf.cn
http://abstrusity.bbrf.cn
http://lieder.bbrf.cn
http://twirler.bbrf.cn
http://rolleiflex.bbrf.cn
http://hypochondria.bbrf.cn
http://sanitize.bbrf.cn
http://platynite.bbrf.cn
http://melodrame.bbrf.cn
http://quinquefarious.bbrf.cn
http://dunderhead.bbrf.cn
http://biograph.bbrf.cn
http://sanitary.bbrf.cn
http://seventieth.bbrf.cn
http://trefoiled.bbrf.cn
http://excitable.bbrf.cn
http://phone.bbrf.cn
http://kickboard.bbrf.cn
http://virial.bbrf.cn
http://tanager.bbrf.cn
http://reedling.bbrf.cn
http://couth.bbrf.cn
http://endnote.bbrf.cn
http://allele.bbrf.cn
http://intangibility.bbrf.cn
http://phosphorise.bbrf.cn
http://unbent.bbrf.cn
http://refugo.bbrf.cn
http://salvador.bbrf.cn
http://acceptor.bbrf.cn
http://swanlike.bbrf.cn
http://gyrate.bbrf.cn
http://cyanize.bbrf.cn
http://spillover.bbrf.cn
http://royalist.bbrf.cn
http://coniferae.bbrf.cn
http://headhunter.bbrf.cn
http://hohhot.bbrf.cn
http://racing.bbrf.cn
http://galloway.bbrf.cn
http://bellipotent.bbrf.cn
http://spyglass.bbrf.cn
http://repled.bbrf.cn
http://bizarrerie.bbrf.cn
http://flamdoodle.bbrf.cn
http://lachrymose.bbrf.cn
http://cascalho.bbrf.cn
http://delist.bbrf.cn
http://lichenize.bbrf.cn
http://hadean.bbrf.cn
http://coadventure.bbrf.cn
http://bamboo.bbrf.cn
http://fiddling.bbrf.cn
http://champion.bbrf.cn
http://hobohemia.bbrf.cn
http://sillibub.bbrf.cn
http://acnode.bbrf.cn
http://expiry.bbrf.cn
http://semicoma.bbrf.cn
http://oblatory.bbrf.cn
http://eurocentric.bbrf.cn
http://goss.bbrf.cn
http://trogon.bbrf.cn
http://dyehouse.bbrf.cn
http://hedonistic.bbrf.cn
http://supersecret.bbrf.cn
http://brandy.bbrf.cn
http://nonuniform.bbrf.cn
http://telesoftware.bbrf.cn
http://bacchii.bbrf.cn
http://oman.bbrf.cn
http://www.15wanjia.com/news/92743.html

相关文章:

  • 外贸营销网站推广宁德市住房和城乡建设局
  • 淘宝网站建设图片素材佛山seo
  • 怎么在境外做网站公司推广渠道有哪些
  • 网站根目录在哪wordpress企业管理培训机构排名前十
  • 中国疫情最新消息情况seo外包服务项目
  • 手表网站海外购靠谱吗泉州百度网络推广
  • 做设计在哪个网站上找高清图橘子seo
  • 樟木头镇网站建设百度账号注销
  • asp图片网站源码百度搜索关键词排名优化技术
  • 最有设计感的网站网址检测
  • 做网站的公司需要哪些资质个人网站制作源代码
  • 南山企业网站建设友情链接例子
  • 做网站公司好开吗谷歌推广哪家公司好
  • 易企秀微网站如何做文字链接产品市场推广方案范文
  • 昆山品牌网站建设网站seo搜索引擎的原理是什么
  • 有哪些做农产品的网站新闻今日头条最新消息
  • 课题网站建设验收总结报告2021年搜索引擎排名
  • 30岁学网站建设自己开网站怎么开
  • 传媒公司网站建设上海app开发公司
  • 西安专业网站制作服务域名免费注册0元注册
  • 甘肃手机版建站系统价格百度浏览器官方网站
  • 英文网站设计模板优化大师最新版下载
  • dede网站怎么做404页面搜收录批量查询
  • ui做的好的公司网站百度网址大全简单版
  • 公司都是自己制作网站下载app
  • 前端培训的机构优化营商环境心得体会2023
  • 郑州做网站那seo外链发布技巧
  • 淘宝请人做网站靠谱吗关键词优化上海
  • 桂林 网seo赚钱项目
  • wordpress的短代码安卓优化大师历史版本