• 01Airtest测试web_环境安装


    1、环境安装

    1)下载AirtestIDE并且安装,官网地址:Airtest Project

    下载后解压,打开包内的AirtestIDE.exe

    2)默认的AirtestIDE并没有操作web的窗口:

     3)打开菜单栏上的窗口-》selenium window,打开web相关的窗口:

    4)设置chrome.exe的位置,这里不要搞错了,最开始就是因为搞成chromedriver.exe的位置了,死活打不开浏览器,唉!

    选项-》设置-》

     5)点击selenium window上的按钮进行打开浏览器,识别、录制:

     注意:识别元素和录制脚本要在selenium window打开的浏览器上进行

    开始写代码了,发现和selenium脚本 一样。。。。

    另外,我们使用AirtestIDE自带的环境来运行Web自动化脚本,则直接运行即可,因为内嵌的python环境已经事先安装好了airtest-selenium库,即下图的地方不设置就是默认用自带的python环境;

     但是如果我们指定使用本地python环境或者脱离AirtestIDE运行Web自动化脚本,则需要我们在对应的python环境里安装好airtest-selenium库,可能还需要pynput库:

    直接使用pip install airtest-seleniumt和pip install pynput,其它还缺什么库按提示装吧!

    其它问题可以看看这篇:聊一聊使用airtest-selenium做Web自动化的常见问题 - it610.com

    总体来说,这个AirtestIDE环境比appium装起来简单多了

    另外一些日志报错可以忽略如下这些,好像不影响软件使用:

    Traceback (most recent call last):
      File "site-packages\pychrome\tab.py", line 152, in _handle_event_loop
      File "plugins/selenium_plugin\selenium_assistant.py", line 185, in recording_event_callback
      File "site-packages\pychrome\tab.py", line 172, in call_method
      File "site-packages\pychrome\tab.py", line 113, in _send
    pychrome.exceptions.UserAbortException: User abort, call stop() when calling Overlay.enable
    E:\AirtestIDE13\AirtestIDE\pychrome\tab.py:174: UserWarning: DOM.describeNode error: Could not find node with given id

    [12116:22416:0906/101134.731:ERROR:chrome_browser_main_extra_parts_metrics.cc(228)] crbug.com/1216328: Checking Bluetooth availability started. Please report if there is no report that this ends.
    [12116:22416:0906/101134.732:ERROR:chrome_browser_main_extra_parts_metrics.cc(231)] crbug.com/1216328: Checking Bluetooth availability ended.

     

  • 相关阅读:
    Java线程中sleep()、wait()、yield()、join()方法的使用
    OSPF高级特性 —— 修改参考带宽值 + 修改优先级
    spidev的使用(SPI用户态API)
    DingoDB多模向量数据库,大模型时代的数据觉醒
    第三方在线地图源有哪些?
    总结Kibana DevTools如何操作elasticsearch的常用语句
    森林防火系统集成解决方案
    人工神经网络算法的应用,人工神经网络发展历史
    多幅图像全景拼接代码修改
    某OA系统审计小记
  • 原文地址:https://blog.csdn.net/weixin_39430584/article/details/126703994