【发布时间】:2015-10-14 23:49:03
【问题描述】:
我的 Robot Framework 测试套件遇到了问题。我有一个像这样的简单测试结构:
robotframework
|_foo
|_tests folder
|_pages folder
|_firefoxTestProfile folder
|_...
我已经设置了一个基本的 Firefox 配置文件路径来运行我的测试并设置了如下变量:
*** Variables ***
${FF_PROFILE} foo\firefoxTestProfile
*** Keywords ***
Open browser window
Open Browser ${test_url} ${browser}
... ff_profile_dir=${FF_PROFILE}
当我从顶层目录运行测试时,它运行良好:
C:/robotframework$ pybot foo/tests/test.txt
但是,如果我尝试从 foo 目录运行它,如下所示:
C:/robotframework/foo$ pybot tests/test.txt
测试抛出失败,说明
"The system cannot find the path specified: foo/firefoxTestProfile/*.*"
我尝试了各种方法,例如将路径设置为
../foo/firefoxTestProfile
/foo/firefoxTestProfile
firefoxTestProfile
以及将 firefoxTestProfile 文件夹移动到文件结构中的不同路径并更新到该新路径,但这些都不起作用并显示与以前相同的错误消息。
这也很重要,因为我想要一个默认的 firefox 配置文件与测试一起运行,并且这些测试在不同的人之间传递,以便在他们的机器上本地运行它们。任何帮助将不胜感激。
【问题讨论】:
标签: testing automated-tests relative-path filepath robotframework