Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

跳转页面到[]报错,执行该语句报错 #8

Closed
ericchen82 opened this issue Feb 18, 2022 · 1 comment
Closed

跳转页面到[]报错,执行该语句报错 #8

ericchen82 opened this issue Feb 18, 2022 · 1 comment

Comments

@ericchen82
Copy link

问题描述 / Describe the bug
config/schema_url.json中已配置页面地址,跳转页面到[]报错,执行该语句报错

问题复现步骤 / To Reproduce
启动app
离开主页,进入到app其他页面
跳转页面到[指定schema-url]爆粗

预期结果 / Expected behavior
跳转到指定schema-url

截图 / Screenshots

环境信息 / Environment (please complete the following information):

  • Device: [android11]
  • OS: [macOS]
  • Browser []
  • Version [0.15]

Additional context
2022-02-18 13:38:39,021 - flybirds_log - INFO - <when "跳转页面到[qqq]">
2022-02-18 13:38:39,021 - flybirds_log - INFO - run step:跳转页面到[qqq]
2022-02-18 13:38:39,022 - flybirds_log - INFO - result_dic: {'pageName': 'qqq'}
2022-02-18 13:38:39,025 - flybirds_log - INFO - feature:失败重新运行1 scenario:验证点击--点击元素切换页面并输入 failed to run
2022-02-18 13:38:39,025 - flybirds_log - INFO - step:跳转页面到[qqq]
2022-02-18 13:38:39,025 - flybirds_log - ERROR - Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/behave/model.py", line 1329, in run
match.run(runner.context)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/behave/matchers.py", line 98, in run
self.func(context, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flybirds/core/dsl/step/page.py", line 15, in jump_to_page
g_Context.step.jump_to_page(context, param_1)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flybirds/core/plugin/plugins/default/android/step.py", line 39, in jump_to_page
jump_to_page(context, param)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flybirds/core/plugin/plugins/default/step/schema.py", line 23, in jump_to_page
snippet.schema_goto(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flybirds/utils/snippet.py", line 67, in schema_goto
schema_rule = getattr(schema_goto_module, "schema_deal_rule")
AttributeError: module 'app.operation' has no attribute 'schema_deal_rule'

@DHpie
Copy link
Collaborator

DHpie commented Feb 18, 2022

这个应该是 项目pscript/app/operation.py 文件中没有定义 schema_deal_rule()方法导致的。schema_deal_rule()方法用于自定义app 内部的schema跳转规则,每个app内部的schema跳转规则是不一致。下面是我列举的一个简单的例子,以供参照:

  • [schema_url.json]

image

  • [operation.py]

image

DHpie pushed a commit that referenced this issue Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants