I run robot, sometimes in Linux and sometimes in Windows. Is there a simple way to identify on which OS robot runs, so it could apply different behavior?
            Asked
            
        
        
            Active
            
        
            Viewed 3,207 times
        
    2
            
            
        - 
                    You could write keywords around platform library that return platform name: http://stackoverflow.com/questions/1854/python-what-os-am-i-running-on – Pekka Jun 27 '16 at 09:31
1 Answers
6
            
            
        You can use the Evaluate keyword to return python's platform information.
*** Test Cases ***
Example
    ${system}=    Evaluate    platform.system()    platform
    log to console    \nI am running on ${system}
For more information about asking python about what system it is running on, see this question: Python: What OS am I running on?
 
    
    
        Community
        
- 1
- 1
 
    
    
        Bryan Oakley
        
- 370,779
- 53
- 539
- 685
