Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top