문제

I'm trying to find a Keyword or automatic variable that contains the current platform that the robot framework suite is being run on.

I assume it must know to allow it to access the file system.

I wanted to use this to load variable resources depending on the current platform

도움이 되었습니까?

해결책

You can use the Evaluate keyword to get the platform from python using sys.platform:

*** Test Cases ***
| Example which logs the current platform
| | ${platform}= | Evaluate | sys.platform | sys
| | log | ${platform}

The exact values that are returned are documented in the sys.platform documentation.

For more fine-grained information, such as processor type, you can use the platform module in a similar manner.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top