diff --git a/README.md b/README.md index 1d80453a..9dd9d13c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Flybirds是基于BDD模式的前端UI自动化测试框架,提供了一系列开 使用Flybirds你能够完成大部分的手机端自动化操作,以下是一些帮助入门的特性描述: - 基于BDD模式,类自然语言语法 -- 支持自动化Web、APP操作, 表单提交、UI元素校验、键盘输入、Deeplink跳转等 +- 支持Android、iOS、Web 自动化操作、表单提交、UI元素校验、键盘输入、Deeplink跳转等 - 默认支持英文、中文两种语言,支持更多语言扩展 - 插件式设计,支持用户自定义自动化扩展 - 提供cli脚手架,快速搭建项目 @@ -48,7 +48,7 @@ Flybirds是基于BDD模式的前端UI自动化测试框架,提供了一系列开 ```bash pip3 install flybirds ``` -在Mac/Linux系统下,需要手动赋予adb可执行权限 +在Mac/Linux系统下,需要手动赋予adb可执行权限,Android项目才能正常工作 - for mac ```bash @@ -65,6 +65,21 @@ chmod +x adb ```bash flybirds create ``` +Web项目,需安装浏览器 +```bash +# 不带参数的运行将安装默认所有浏览器 +playwright install +``` + +```bash +# 通过提供一个参数来安装特定的浏览器 +playwright install webkit +``` + +```bash +# 查看支持安装的浏览器 +playwright install --help +``` ## 教程 - [环境准备](https://flybirds.readthedocs.io/zh_CN/latest/BDD-UI-Testing-Flybirds.html#id5) diff --git a/docs/casedsl.md b/docs/casedsl.md index 5c352113..078f2756 100644 --- a/docs/casedsl.md +++ b/docs/casedsl.md @@ -56,7 +56,7 @@ The "[]" in the statement template needs to add a value, otherwise the statement ## Statement template: **connect device[{param}]** -- platform: Android +- platform: Android , IOS - description:connect test device - example:connect device [10.21.37.123:5555] @@ -76,6 +76,7 @@ The "[]" in the statement template needs to add a value, otherwise the statement - example:start app [package name] **restart app** +- platform: Android, IOS - description:restart app **go to home page** @@ -91,7 +92,7 @@ The "[]" in the statement template needs to add a value, otherwise the statement - PS:User-defined implementation, implement the logout() method in the pscript/app/operation.py file **exist text[string{, fuzzyMatch=false, timeout=10}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description:find specified string exists in the page - timeout Search timeout time, priority: default value < “waitEleTimeout” in flybirds_config.json< Specified in the statement ```js @@ -100,7 +101,7 @@ exist text [flight, timeout=10] exist text [.?ght, fuzzyMatch=true] ``` **not exist text[string{, fuzzyMatch=false}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description:find specified string not exists in the page ```js not exist text [flight] @@ -108,7 +109,7 @@ not exist text [flight, timeout=10] not exist text [.?ght, fuzzyMatch=true] ``` **text[string{, fuzzyMatch=false, timeout=10}]disappear** -- platform: Android, IOS +- platform: Android, IOS,Web - description:specified character string disappears from the page within the specified time timeout timeout for waiting to disappear, priority: default value < “waitEleDisappear” in flybirds_config.json< Specified in the statement ```js @@ -116,7 +117,7 @@ text [flight] disappear text [.?ght, fuzzyMatch=true, timeout=20] disappear ``` **exist element [selector{, path=false, multiSelector=false, timeout=10}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description:check element of the specified selector on the page - timeout timeout for waiting to disappear, priority: default value < “waitEleTimeout” in flybirds_config.json < Specified in the statement ```js @@ -126,7 +127,7 @@ exist element [textMatches=.?eco] exist element [textMatches=.?eco and type=android.view.ViewGroup, multiSelector=true, timeout=30] ``` **not exist element[selector{, path=false, multiSelector=false}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description:check element of the specified selector not on the page ```js not exist element [center_content_layout] @@ -135,7 +136,7 @@ not exist element [textMatches=.?eco] not exist element [textMatches=.?eco and type=android.view.ViewGroup, multiSelector=true, timeout=30] ``` **element[selector{, path=false, multiSelector=false, timeout=10}]disappear** -- platform: Android, iOS +- platform: Android, iOS,Web - description:specified selector disappears from the page within the specified time - timeout: timeout for waiting to disappear, priority: default value < “waitEleDisappear” in flybirds_config.json < Specified in the statement ```js @@ -143,7 +144,7 @@ element [center_content_layout] disappear element [text=flight] disappear ``` **the text of element [selector{, path=false, multiSelector=false, timeout=10}] is [string{, dealMethod=name}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description:specify the text of the element of the selector as the specified string - timeout timeout for waiting to disappear, priority: default value < “waitEleTimeout” in flybirds_config.json < Specified in the statement ```js @@ -152,7 +153,7 @@ the text of element [textMatches=.?economic, timeout=15] is [economic, dealMetho the text of element [textMatches=.?economic and visible=True, multiSelector=true, timeout=15] is [economic, dealMethod=trim_prefix] ``` **the text of element [selector{, path=false, multiSelector=false, timeout=10}] include [string{, dealMethod=name}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description:pecify the text of the element of the selector include the specified string - timeout timeout for waiting to disappear, priority: default value < “waitEleTimeout” in flybirds_config.json < Specified in the statement ```js @@ -161,7 +162,7 @@ the text of element [textMatches=.?economic, timeout=15] include [economic, deal the text of element [textMatches=.?economic and visible=True, multiSelector=true, timeout=15] include [economic, dealMethod=trim_prefix] ``` **element[selector{, path=false, multiSelector=false, timeout=10}] appear after page rendering** -- platform: Android, iOS +- platform: Android, iOS,Web - description:when entering a new page, you can determine that the page rendering is complete by specifying the element of the selector to appear on the page - timeout timeout for waiting to disappear, priority: default value < “pageRenderTimeout” in flybirds_config.json < Specified in the statement ```js @@ -170,7 +171,7 @@ element [center_content_layout, timeout=15] appear after page rendering element [center_content_layout, timeout=40] appear after page rendering ``` **click text[string{, fuzzyMatch=false, timeout=10, verifyEle=null, verifyIsPath=false, verifyIsMultiSelector=false, verifyTimeout=10, verifyAction=null}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description:click on the string specified on the page - timeout: find the timeout of "string", priority: default value < “waitEleTimeout” in flybirds_config.json < specified in the statement - verifyEle: if there is partial rendering after clicking, use the relevant information of the element represented by the selector specified by this attribute to determine @@ -186,7 +187,7 @@ click text [flight, verifyEle=center_content_layout, verifyAction=position] click text [flight, verifyEle=text=filterand =textView, verifyIsMultiSelector=true, verifyAction=position] ``` **click[selector{, path=false, multiSelector=false, timeout=10, verifyEle=null, verifyIsPath=false, verifyIsMultiSelector=false, verifyTimeout=10, verifyAction=null}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description: click on the element of the specified selector on the page - timeout: find the timeout of "string", priority: default value < “waitEleTimeout” in flybirds_config.json < specified in the statement - verifyEle: if there is partial rendering after clicking, use the relevant information of the element represented by the selector specified by this attribute to determine @@ -206,7 +207,7 @@ click [flight, verifyEle=text=filterand =textView, verifyIsMultiSelector=true, v click position [200,100] ``` **text [string{, fuzzyMatch=false, timeout=10}]property [{, dealMethod=name}]is {}** -- platform: Android, iOS +- platform: Android, iOS,Web - description:the value of the specified attribute of the element corresponding to the specified string in the page is the specified value - timeout: find the timeout of "string", priority: default value < “waitEleTimeout” in flybirds_config.json < Specified in the statement ```js @@ -214,7 +215,7 @@ text [economic] property [text] is flight text [economic, timeout=15] property [text, dealMethod=trim_last] is fli ``` **element[selector{, path=false, multiSelector=false, timeout=10}]property[property name{, dealMethod=name}]is{property value}** -- platform: Android, iOS +- platform: Android, iOS,Web - description:the value of the specified attribute of the element of the specified selector on the page is the specified value - timeout: find the timeout of "string", priority: default value < “waitEleTimeout” in flybirds_config.json < Specified in the statement ```js @@ -222,7 +223,7 @@ element [text=flight] property [text] is flight element [text=flight, timeout=15] property[text, dealMethod=trim_last] is fli ``` **input[selector{, path=false, multiSelector=false, timeout=10}]into[string{, pocoInput=false, afterInputWait=1}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description:input the specified copy in the element of the specified selector - timeout: find the timeout of "string", priority: default value < “waitEleTimeout” in flybirds_config.json < Specified in the statement - pocoInput: Whether to use the input method of poco, the input method of airtest is used by default, Priority: default < “usePocoInput” in flybirds_config.json < Specified in the statement @@ -233,7 +234,7 @@ input [shanghai] into [inputEleId] input [david, pocoInput=true, afterInputWait=5] into [type=InputView] ``` **[selector{, path=false, multiSelector=false, timeout=10}] slide to {up/down/left/right} distance [value{, startX=0.5, startY=0.5, duration=null, readyTime=null}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description:slide the specified distance in the specified direction in the sliding container of the specified selector - timeout: find the timeout of "string", priority: default value < “waitEleTimeout” in flybirds_config.json < Specified in the statement - startX: the coordinate value of the X axis of the starting coordinate of the sliding in the container,<=1 represents the percentage,>1 representative pixel @@ -246,7 +247,7 @@ input [david, pocoInput=true, afterInputWait=5] into [type=InputView] [containerEleId] slide to right [100, startX=0.2, startY=0.4, duration=5, readyTime=3] ``` **slide to {up/down/left/right} distance [value{, startX=0.5, startY=0.5, duration=null, readyTime=null}]** -- platform: Android, iOS +- platform: Android, iOS,Web - description:use the full screen as the container to slide the specified distance in the specified direction - startX: the coordinate value of the X axis of the sliding start coordinate in the full screen,<=1 represents the percentage,>1 representative pixel - startY: the coordinate value of the Y axis of the sliding start coordinate in the full screen,<=1 represents the percentage,>1 representative pixel @@ -257,7 +258,7 @@ slide to up distance [0.05] slide to down [0.4, readyTime=3, duration=2] ``` **from {up/down/left/right} find [selector{, path=false, multiSelector=false, swipeCount=5, startX=0.5, startY=0.5, distance=0.3, duration=null}]element** -- platform: Android, iOS +- platform: Android, iOS,Web - description:swipe to the specified direction on the full screen to find the element of the specified selector - swipeCount: swipe to find the maximum number of swipes. If the specified element is not found on the page after the sliding operation exceeds this value, it will fail. priority: default < “swipeSearchCount” in flybirds_config.json < Specified in the statement - startX: Slide the X-axis coordinate value of the starting coordinate in the full screen, <=1 means percentage, >1 means pixel @@ -276,23 +277,27 @@ from left find [testId, distance=0.5, duration=2, swipeCount=8] element - verifyCount: maximum number of judgments,priority: default <“verifyPosNotChangeCount” in flybirds_config.json < Specified in the statement **start recording timeout[time]** -- platform: Android +- platform: Android,iOS - description:start to record the screen, stop recording when the timeout period is not stopped + **start record** -- platform: Android +- platform: Android,iOS - description: start recording the screen, using the default timeout period (configured in the configuration file) + **stop record** -- platform: Android +- platform: Android,iOS,Web - description:stop the screen recording and associate the video file to the report + **wait[time]seconds** -- platform: Android, iOS +- platform: Android, iOS,Web - description:wait for a while + **screenshot*** -- platform: Android, iOS +- platform: Android, iOS,Web - description:take a screenshot of the current screen and associate it with the report **go to url[url address]** -- platform: Android +- platform: Android,Web - description:Jump to the specified page through the schema, and the page name is maintained in the form of "page name: page schemaUrl" in config/schema_url.js ```js go to url [list page] diff --git a/docs/casedsl_zhCN.md b/docs/casedsl_zhCN.md index 1e20c514..33a78d55 100644 --- a/docs/casedsl_zhCN.md +++ b/docs/casedsl_zhCN.md @@ -55,7 +55,7 @@ ## 语句模版: **连接设备[{param}]** -- 支持平台:Android +- 支持平台:Android 、 IOS - 语义:连接测试设备 - 例子:连接设备[10.21.37.123:5555] @@ -91,7 +91,7 @@ - 注:用户自定义实现, 在 pscript/app/operation.py 文件中实现 logout() 方法 **存在[字符串{, fuzzyMatch=false, timeout=10}]的文案** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:页面中存在指定的字符串 - timeout 查找的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 ```js @@ -100,14 +100,14 @@ 存在[.?票, fuzzyMatch=true]的文案 ``` **不存在[字符串{, fuzzyMatch=false}]的文案** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:页面中不存在指定的文案 ```js 不存在[机票]的文案 不存在[.?票, fuzzyMatch=true]的文案 ``` **文案[字符串{, fuzzyMatch=false, timeout=10}]消失** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:指定的字符串在规定时间内从页面消失 timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.json中的“waitEleDisappear” < 语句中指定 ```js @@ -115,7 +115,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 文案[.?票, fuzzyMatch=true, timeout=20]消失 ``` **存在[选择器{, path=false, multiSelector=false, timeout=10}]的元素** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:页面中存在指定 选择器 的元素 - timeout 查找的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 ```js @@ -126,7 +126,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 存在[机票→第1个兄弟节点, path=true]的元素 ``` **不存在[选择器{, path=false, multiSelector=false}]的元素** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:页面中不存在指定 选择器 的元素 ```js 不存在[center_content_layout]的元素 @@ -144,7 +144,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 元素[机票→第1个兄弟节点, path=true, timeout=15]消失 ``` **[选择器{, path=false, multiSelector=false, timeout=10}]的文案为[字符串{, dealMethod=name}]** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:指定 选择器 的元素的文案为指定的字符串 - timeout 查找的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 ```js @@ -153,7 +153,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j [textMatches=.?经济舱并且visible=True, multiSelector=true, timeout=15]的文案为[经济舱, dealMethod=trim_prefix] ``` **[选择器{, path=false, multiSelector=false, timeout=10}]的文案包含[字符串{, dealMethod=name}]** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:指定 选择器 的元素的文案包含指定的字符串 - timeout 查找的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 ```js @@ -164,7 +164,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j [textMatches=.?经济舱并且visible=True, multiSelector=true, timeout=15]的文案包含[经济, dealMethod=trim_prefix] ``` **页面渲染完成出现元素[选择器{, path=false, multiSelector=false, timeout=10}]** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:进入新的页面时通过指定 选择器 的元素出现在页面上来判断页面渲染完成 - timeout 查找的超时时间,优先级:默认值 < flybirds_config.json中的“pageRenderTimeout” < 语句中指定 ```js @@ -175,7 +175,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 页面渲染完成出现元素[center_content_layout, timeout=40] ``` **点击文案[字符串{, fuzzyMatch=false, timeout=10, verifyEle=null, verifyIsPath=false, verifyIsMultiSelector=false, verifyTimeout=10, verifyAction=null}]** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:点击页面上指定的 字符串 - timeout 查找“字符串”的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 - verifyEle 点击后如果有局部渲染,使用该属性指定的选择器代表的元素的相关信息判断 @@ -191,7 +191,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 点击文案[机票, verifyEle=text=筛选并且type=textView, verifyIsMultiSelector=true, verifyAction=position] ``` **点击[选择器{, path=false, multiSelector=false, timeout=10, verifyEle=null, verifyIsPath=false, verifyIsMultiSelector=false, verifyTimeout=10, verifyAction=null}]** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义: 点击页面上指定 选择器 的元素 - timeout 查找“字符串”的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 - verifyEle 点击后如果有局部渲染,使用该属性指定的选择器代表的元素的相关信息判断 @@ -211,7 +211,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 点击屏幕位置[200,100] ``` **文案[字符串{, fuzzyMatch=false, timeout=10}]的属性[属性名{, dealMethod=name}]为{属性值}** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:页面中指定 字符串对应的元素的指定的属性的值为指定的值 - timeout 查找“字符串”的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 ```js @@ -219,7 +219,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 文案[机票, timeout=15]的属性[text, dealMethod=trim_last]为机 ``` **元素[选择器{, path=false, multiSelector=false, timeout=10}]的属性[属性名{, dealMethod=name}]为{属性值}** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:页面中指定 选择器 的元素的指定的 属性的值为指定的 值 - timeout 查找“字符串”的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 ```js @@ -227,7 +227,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 元素[text=机票, timeout=15]的属性[text, dealMethod=trim_last]为机 ``` **在[选择器{, path=false, multiSelector=false, timeout=10}]中输入[文案{, pocoInput=false, afterInputWait=1}]** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:在指定选择器的元素中输入指定的文案 - timeout 查找“字符串”的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 - pocoInput: 是否使用 poco 的输入方法,默认使用的是airtest的输入方法, 优先级:默认值 < flybirds_config.json中的“usePocoInput” < 语句中指定 @@ -237,7 +237,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 在[type=InputView]中输入[用户名, pocoInput=true, afterInputWait=5] ``` **[选择器{, path=false, multiSelector=false, timeout=10}]向{上/下/左/右}滑动[滑动距离{, startX=0.5, startY=0.5, duration=null, readyTime=null}]** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:在指定 选择器 的滑动容器内向指定 方向 滑动指定 距离 - timeout 查找“字符串”的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 - startX: 在容器中滑动起始坐标的X轴的坐标值,<=1 代表百分比,>1代表像素点 @@ -250,7 +250,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j [containerEleId]向上滑动[100, startX=0.2, startY=0.4, duration=5, readyTime=3] ``` **全屏向{上/下/左/右}滑动[滑动距离{, startX=0.5, startY=0.5, duration=null, readyTime=null}]** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:以全屏为容器向指定 方向 滑动指定 距离 - startX: 在全屏中滑动起始坐标的X轴的坐标值,<=1 代表百分比,>1代表像素点 - startY: 在全屏中滑动起始坐标的Y轴的坐标值,<=1 代表百分比,>1代表像素点 @@ -261,7 +261,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 向下滑动[0.4, readyTime=3, duration=2] ``` **在[选择器{, path=false, multiSelector=false, timeout=10}]中向{上/下/左/右}查找[选择器{, path=false, multiSelector=false, swipeCount=5, startX=0.5, startY=0.5, distance=0.3, duration=null}]的元素** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:在指定 选择器 的元素内 向指定方向滑动查找 指定选择器的元素 - timeout 查找“字符串”的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 - swipeCount: 滑动查找最大滑动次数,超过这个值的滑动操作后还未在页面中找到指定元素则失败, 优先级:默认值 < flybirds_config.json中的“swipeSearchCount” < 语句中指定 @@ -274,7 +274,7 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j 在[containerId]中向下查找[testId, distance=0.5, duration=2, swipeCount=8] ``` **向{上/下/左/右}查找[选择器{, path=false, multiSelector=false, swipeCount=5, startX=0.5, startY=0.5, distance=0.3, duration=null}]的元素** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:在全屏向指定方向滑动查找 指定选择器的元素 - swipeCount: 滑动查找最大滑动次数,超过这个值的滑动操作后还未在页面中找到指定元素则失败, 优先级:默认值 < flybirds_config.json中的“swipeSearchCount” < 语句中指定 - startX: 在全屏中滑动起始坐标的X轴的坐标值,<=1 代表百分比,>1代表像素点 @@ -290,24 +290,33 @@ timeout 等待消失的超时时间 ,优先级:默认值 < flybirds_config.j - 语义: 指定选择器的元素在指定时间位置未发生变化,目的是判断页面未处于滑动状态 - timeout 查找“字符串”的超时时间,优先级:默认值 < flybirds_config.json中的“waitEleTimeout” < 语句中指定 - verifyCount: 最大判断次数,优先级:默认值 < flybirds_config.json中的“verifyPosNotChangeCount” < 语句中指定 + **开始录屏超时[time]** -- 支持平台:Android +- 支持平台:Android、iOS - 语义:开始录制屏幕,到超时时间未停止则停止录屏 + + **开始录屏** -- 支持平台:Android +- 支持平台:Android、iOS - 语义: 开始录制屏幕,使用默认的超时时间(在配置文件中配置) + + **结束录屏** -- 支持平台:Android +- 支持平台:Android、iOS、Web - 语义:结束录制屏幕,并将视频文件关联到报告中 + + **等待[time]秒** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:执行暂停指定时间 + + **全屏截图*** -- 支持平台:Android、iOS +- 支持平台:Android、iOS、Web - 语义:截取当前屏幕快照并关联到报告中 **跳转到[页面名称]** -- 支持平台:Android +- 支持平台:Android、Web - 语义:通过schema跳转到指定页面,页面名称在config/schema_url.json 中以 "页面名称: 页面schemaUrl" 的形式维护 ```js 跳转到[首页] diff --git a/docs/flybirds_cli_zhCN.md b/docs/flybirds_cli_zhCN.md index 0f9e4e11..434e295a 100644 --- a/docs/flybirds_cli_zhCN.md +++ b/docs/flybirds_cli_zhCN.md @@ -106,8 +106,8 @@ flybirds run --report report\curent\report.json 作用1:覆盖`config`配置文件中的相应配置的值,比如: ```bash - # 运行时使用的设备和uniqueTag为命令中指定的值,不会取配置文件中配置的值 -flybirds run --define deviceId=*** --define uniqueTag=*** +# 通过参数切换执行平台Android、iOS、Web +flybirds run --define platform=web ``` 作用2: 传入自定义参数以便在`pscript`目录下的自定义脚本中使用,使用全局参数 `global_resource` 获取. diff --git a/docs/readme_en.md b/docs/readme_en.md index 4cabc0a3..0623c512 100644 --- a/docs/readme_en.md +++ b/docs/readme_en.md @@ -22,7 +22,7 @@ Flybirds is a front-end UI automation test framework based on BDD mode, providin With Flybirds you can do most of the mobile automation, here are some features to help you get started: - Based on BDD pattern, similar natural language syntax -- Support automatic web、app operation, form submission, UI element verification, keyboard input, deeplink jump, etc. on the Android side. The IOS side is in progress +- Support Android、iOS、Web automatic operation, form submission, UI element verification, keyboard input, deeplink jump, etc. on the Android side. The IOS side is in progress - English and Chinese are supported by default. Support more languages ​​extensions - Plug in design, support user-defined automation framework extension - Provide cli scaffolding construction to help build projects quickly @@ -159,4 +159,4 @@ Thanks for all these great works that make this project better. - [airtest](https://github.com/AirtestProject) - [behave](https://github.com/behave) - [playwright](https://github.com/microsoft/playwright-python) -- [multiple-cucumber-html-reporter](https://github.com/wswebcreation/multiple-cucumber-html-reporter) \ No newline at end of file +- [multiple-cucumber-html-reporter](https://github.com/wswebcreation/multiple-cucumber-html-reporter) diff --git a/docs/relate.md b/docs/relate.md index 4513be0f..428a76bc 100644 --- a/docs/relate.md +++ b/docs/relate.md @@ -17,19 +17,20 @@ Each version of Playwright needs specific versions of browser binaries to operate. When you perform UI automation testing on the web platform, you need to use the **[Playwright CLI](https://playwright.dev/python/docs/cli)** to install these browsers. -Playwright can install supported browsers. - ```bash -# Running without arguments will install default browsers +# running without arguments will install default browsers playwright install ``` -You can also install specific browsers by providing an argument: - ```bash -# Install WebKit +# install specific browsers by providing an argument playwright install webkit ``` +```bash +# see all supported browsers +playwright install --help +``` + diff --git a/docs/relate_zhCN.md b/docs/relate_zhCN.md index 89329482..9d807ad5 100644 --- a/docs/relate_zhCN.md +++ b/docs/relate_zhCN.md @@ -26,17 +26,19 @@ 每个版本的Playwright都需要特定版本的浏览器二进制文件来运行。当你在web端进行UI 自动测试时, 需要使用 **[Playwright CLI](https://playwright.dev/python/docs/cli)** 来安装这些浏览器。 -Playwright支持可以安装的浏览器。 - ```bash -# 不带参数的运行将安装默认浏览器 +# 不带参数的运行将安装默认所有浏览器 playwright install ``` -你也可以通过提供一个参数来安装特定的浏览器: - ```bash -# 安装 WebKit +# 通过提供一个参数来安装特定的浏览器 playwright install webkit ``` +```bash +# 查看支持安装的浏览器 +playwright install --help +``` + +