Pergunta

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

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top