简体   繁体   中英

Path to testsuite file in robot Framework

I'm trying to get the path of test files given to pybot via the command line in the python code:

I tried:

from robot.libraries.BuiltIn import BuiltIn

file_path = BuiltIn().run_keyword("Get Variable Value", "${CURDIR}")

It returns none , any guess?

The variable that stores it is ${SUITE SOURCE} .
Also, it's not needed to go through the run_keyword() , you can just call get_variable_value directly:

file_path = BuiltIn().get_variable_value("${SUITE SOURCE}")

Keep in mind the returned value is an absolute path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM