gpt4 book ai didi

python - 命令行变量不会覆盖机器人框架中的套件级别变量

转载 作者:太空宇宙 更新时间:2023-11-03 15:55:02 25 4
gpt4 key购买 nike

根据机器人文档

Variables set in the command line have the highest priority of all variables that can be set before the actual test execution starts. They override possible variables created in Variable tables in test case files, as well as in resource and variable files imported in the test data

我在关键字 A 中定义了套件级变量 browser 并在 Suite Setup 中调用该关键字

Log Browser is ${browser}   console=True
Set Suite Variable ${browser} chrome
Log Browser is ${browser} console=True

并且还使用命令行 --variable 传递相同的变量pybot.bat --变量浏览器:ie但从日志来看,套件变量似乎覆盖了命令行变量。

我错过了什么?` enter image description here

最佳答案

您引用的文档说明了一切(我已经强调):

Variables set in the command line have the highest priority of all variables that can be set before the actual test execution starts

测试开始后,关键字可以覆盖变量表和命令行参数设置的值。

关于python - 命令行变量不会覆盖机器人框架中的套件级别变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43900886/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com