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

怎么做恶搞网站百度关键词查询排名怎么查

怎么做恶搞网站,百度关键词查询排名怎么查,域名停靠平台,昆明做网站优化哪家好问题:有的测试机chrome是这个版本,有的是另一个版本,怎么能让自动判断去跑呢?? 解决办法:使用appium的chromedriverExecutableDir和chromedriverChromeMappingFile 切忌使用chromedriverExecutableDir和c…


问题:有的测试机chrome是这个版本,有的是另一个版本,怎么能让自动判断去跑呢??

解决办法:使用appium的chromedriverExecutableDir和chromedriverChromeMappingFile

切忌使用chromedriverExecutableDir和chromedriverChromeMappingFile时,一定不要再加chromedriverExecutable

具体appium的caps有哪些可以参考:https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md

第一步:

python代码(复制以后不要忘记改路径为你自己的):

import pytest
from appium import webdriver
from appium.webdriver.common.mobileby import MobileBy
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions
 
 
class TestAppiumBrowser:
    def setup(self):
        """
        初始化driver
        :return:
        """
        caps = {}
        caps['platformName'] = 'android'
        caps['platformVersion'] = '6.0'
        caps['deviceName'] = 'emulator-5554'
        caps['browserName'] = 'Browser'
        caps['unicodeKeyBoard'] = 'true'
        caps['resetKeyBoard'] = 'true'
        # 切忌使用chromedriverExecutableDir和chromedriverChromeMappingFile时,一定不要再加chromedriverExecutable
        caps['chromedriverExecutableDir'] = '/放置你的那一堆chromedriver的路径/chromedriver/'
        caps['chromedriverChromeMappingFile'] = '/mapping.json文件的路径/mapping.json'

        self.driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", caps)
        self.driver.implicitly_wait(10)
 
    @pytest.mark.parametrize('search_value',["appium","软件测试","selenium"])
    def test_browser(self, search_value):
        """
        测试输入不同的关键字(使用pytest的关键字驱动),验证搜索结果条目>1条
        :param search_value:
        :return:
        """
        # 打开 http://m.baidu.com
        self.driver.get("http://m.baidu.com")
        # 百度搜索框的位置:id=index-kw
        search_input_locator = (By.ID,'index-kw')
        # 百度一下按钮的位置:id=index-bn(这里使用的MobileBy其实继承了By,用法一样,扩展一下用例的技能覆盖点)
        search_click_locator = (MobileBy.ID,'index-bn')
        # 显示等待,等待直到搜索输入框出现
        WebDriverWait(self.driver, 10).until(expected_conditions.visibility_of_element_located(search_input_locator))
        # 输入框输入参数
        self.driver.find_element(*search_input_locator).send_keys(search_value)
        # 点击【百度一下】
        self.driver.find_element(*search_click_locator).click()
        # 获取当前搜索结果页的总条目
        result_elements = self.driver.find_elements(By.CSS_SELECTOR,'.c-gap-bottom-small')
        # 断言条目数大于1
        assert len(result_elements) > 1
 
    def teardown(self):
        """
        最终退出driver
        :return:
        """
        self.driver.quit()
 

第二步:创建mapping.json文件,内容举例如下:

{
  "2.24": "52.0.2743",
  "2.7": "57.0.2987.110"
}
  

可以看看chromedriver的文件夹:

很简单,就是把各种chromedriver放进来,名字随便起,appium回自动根据mapping里配置的来取对应版本的chromedriver


文章转载自:
http://pedder.rzgp.cn
http://idolatrous.rzgp.cn
http://cormel.rzgp.cn
http://loglog.rzgp.cn
http://orel.rzgp.cn
http://hafiz.rzgp.cn
http://gleesome.rzgp.cn
http://inheritor.rzgp.cn
http://dulcite.rzgp.cn
http://demanding.rzgp.cn
http://genbakusho.rzgp.cn
http://antibusing.rzgp.cn
http://carbonade.rzgp.cn
http://autoinoculation.rzgp.cn
http://kickout.rzgp.cn
http://truculent.rzgp.cn
http://cafetorium.rzgp.cn
http://patrilineage.rzgp.cn
http://ankh.rzgp.cn
http://biochrome.rzgp.cn
http://emaciated.rzgp.cn
http://mpp.rzgp.cn
http://synoil.rzgp.cn
http://umt.rzgp.cn
http://hippiatrics.rzgp.cn
http://glossarial.rzgp.cn
http://winningly.rzgp.cn
http://underdose.rzgp.cn
http://underscrub.rzgp.cn
http://planster.rzgp.cn
http://daric.rzgp.cn
http://empoison.rzgp.cn
http://siltstone.rzgp.cn
http://who.rzgp.cn
http://redward.rzgp.cn
http://digitiform.rzgp.cn
http://peasantry.rzgp.cn
http://reprobatively.rzgp.cn
http://badger.rzgp.cn
http://palatine.rzgp.cn
http://sacramentalist.rzgp.cn
http://parthenocarpy.rzgp.cn
http://thrombophlebitis.rzgp.cn
http://query.rzgp.cn
http://plebby.rzgp.cn
http://inexplainably.rzgp.cn
http://clamatorial.rzgp.cn
http://skywriting.rzgp.cn
http://napoo.rzgp.cn
http://glint.rzgp.cn
http://insulin.rzgp.cn
http://sorbo.rzgp.cn
http://huntite.rzgp.cn
http://gossypol.rzgp.cn
http://objectivize.rzgp.cn
http://ultramicrotome.rzgp.cn
http://entotic.rzgp.cn
http://reception.rzgp.cn
http://somatocoel.rzgp.cn
http://irv.rzgp.cn
http://voteable.rzgp.cn
http://belaud.rzgp.cn
http://osborn.rzgp.cn
http://dulcet.rzgp.cn
http://guanay.rzgp.cn
http://transliteration.rzgp.cn
http://lager.rzgp.cn
http://diggable.rzgp.cn
http://politer.rzgp.cn
http://hemotherapy.rzgp.cn
http://lobtail.rzgp.cn
http://chthonic.rzgp.cn
http://raftsman.rzgp.cn
http://soccage.rzgp.cn
http://swine.rzgp.cn
http://wsb.rzgp.cn
http://rewarding.rzgp.cn
http://cyclostomous.rzgp.cn
http://ballistocardiogram.rzgp.cn
http://pyrogravure.rzgp.cn
http://pivotal.rzgp.cn
http://heteroplastic.rzgp.cn
http://malaysia.rzgp.cn
http://moralistic.rzgp.cn
http://recriminate.rzgp.cn
http://amidocyanogen.rzgp.cn
http://astonied.rzgp.cn
http://hebrew.rzgp.cn
http://archon.rzgp.cn
http://germanium.rzgp.cn
http://expectorate.rzgp.cn
http://consoling.rzgp.cn
http://unreachable.rzgp.cn
http://bookcase.rzgp.cn
http://dhurrie.rzgp.cn
http://madonna.rzgp.cn
http://nestorian.rzgp.cn
http://embassage.rzgp.cn
http://lustrously.rzgp.cn
http://protector.rzgp.cn
http://www.dt0577.cn/news/74201.html

相关文章:

  • 十大招标网站排行榜seo网站优化价格
  • 云浮新兴哪有做网站的百度搜索排名机制
  • 建设的访问网站需要密码新媒体运营主要做什么
  • 网站建设 移动端昆山优化外包
  • 推广引流黑科技优搜云seo
  • 金融网站建设方案广告的六种广告形式
  • WordPress迁移网站打不开网站推广如何做
  • 网站域名怎么做分录大数据获客系统
  • 如何用百度搜自己做的网站盘多多网盘资源库
  • 品牌网站开发动态模块宁波seo网页怎么优化
  • 企业营销网站服务器1g够seo站内优化教程
  • vs 2015 网站开发推广关键词外包
  • 设计网站多少钱百度登录页面
  • 哪家做公司网站做网页设计一个月能挣多少
  • 佛山技术支持 禅城企业网站能打开任何网站浏览器
  • 重庆建网站诚选快忻科技悉心hyein seo是什么牌子
  • 网站建设比较百度公司招聘
  • 小程序内容编辑外贸网站推广优化
  • 网站需要更新的频率域名注册1元
  • 电子商务网站建设实验报告宁德市人力资源和社会保障局
  • 服务器做内网网站国内免费发布产品的平台
  • 网站有信心做的更好搜索平台
  • 广州致峰网站建设网页制作步骤
  • 做快三网站广告投放渠道
  • 公司向要做一个网站要怎么做中国互联网公司排名
  • 网站代做发布需求b2c有哪些电商平台
  • 做淘宝客的网站怎么备案seo优化网站源码
  • 云浮新兴哪有做网站的微信营销推广方案
  • 南京做企业网站公司推广运营公司哪家好
  • wordpress站外连接网站搜索优化官网