Flybirds

Latest version: v0.7.0

Safety actively analyzes 706259 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

0.4.2

Feature
1. 对失败场景的截图,自动进行白屏检测,在报告中显示结果
![image](https://user-images.githubusercontent.com/30871402/186859279-c00aa535-e9f2-4cb8-afd3-81a36186fed4.png)

Fix
1. OCR扫描结果中部分文字内的空格,未能正常识别,导致验证失败 99
2. 依赖包安装优化 105
3. 优化错误提示 103

**注意:Windows环境下,不再默认安装OCR相关依赖包,如需使用OCR,按照以下步骤操作**
1. 获取requirement文件:[文件地址](https://github.com/ctripcorp/flybirds/blob/main/requirements_ml.txt)
2. 执行命令`pip install -r requirements_ml.txt`
3. 在flybirds_config.json 文件中配置 OCR 语言 `ocrLang` ,[支持的语言](https://flybirds.readthedocs.io/zh_CN/latest/BDD-UI-Testing-Flybirds.html#ocr-opencv)

0.4.1

Features
1. 新增OCR&OpenCV DSL [79](https://github.com/ctripcorp/flybirds/issues/79)
- 向 [] 扫描 [] 的文案
- 向 [] 查找 [] 的图像
- OCR DSL 支持正则表达式语法
2. 新增Web config [自定义浏览器参数](https://github.com/ctripcorp/flybirds/issues/89)
json
"emulatedDevice": "iPad (gen 6)",
"userAgent": "My user agent",
"width": 550,
"height": 550,
"locale": "de-DE",
"timezone": "Europe/Berlin",
"deviceScaleFactor": 6,
"hasTouch": false,
"geolocation": {
"longitude": 48.858455,
"latitude": 2.294474
},
"permissions": ["geolocation"]

0.4.0

Features
1. Support OpenCV DSL
- "exist image [{param}]": ["存在图像[{param}]"]
- "not exist image [{param}]": ["不存在图像[{param}]"]
- "click image[{selector}]": ["点击图像[{selector}]"]

Example
1. create image folder into the project root folder, for example : "img"
2. Put the images you want to detect in a folder
3. write case
Gherkin
功能:首页图像信息校验

p1
场景: 图像检查
当 启动APP[ctrip.english.debug]
那么 页面扫描完成出现文字[Discover]
那么 存在图像[img/exist.png]
那么 不存在图像[img/ne.png]
那么 点击图像[img/click.png]
那么 页面扫描完成出现文字[Search]


Enhancement
1. [Web] optimizate case After run 77
5. stop record performance need to improve 76

0.3.5

Feature
支持对PaddleOCR扫描错误的结果进行补偿矫正 72
操作说明
1. config目录下增加 paddle_fix.json
2. 在 paddle_fix.json 中自定义矫正配置
json
{
"{original value}":"{replace value}",
"输公":"输入"
}

0.3.4

Features
1. step 中获取全局缓存 65
2. web 测试报告中,失败case添加console error 信息 66

Fix
1. failRerun 配置不生效 69

Example
1. 项目中自定义全局key

from flybirds.core.global_context import GlobalContext

def set_global_value():
设置全局key
GlobalContext.set_global_cache("order_id", "just a test")


2. 在 pscript 包下面的 [operation.py](http://operation.py/) 中添加如下方法,自定义全局key获取方法

from flybirds.core.global_context import GlobalContext

def get_global_value(v):
"""
replace with global cache
"""
order_id 为通过其他step 向global cache 中设置的值
order_id = GlobalContext.get_global_cache("order_id")
if order_id is not None:
替换参数 v 中自定义全局缓存key(规则自己设定,框架不做限制)
return v.replace("order_id", order_id)
返回为None 表示不做替换
return None

3. 在case中使用自定义的全局key:order_id

场景: 输入
假如 跳转页面到[百度]
而且 在[kw]中输入[order_id]
而且 等待[3]秒
那么 全屏截图

0.3.3

Fix
- add background step to screen https://github.com/ctripcorp/flybirds/issues/60

Feature
- update pocoui version to v1.087

Page 5 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.