Note: You are looking at a static snapshot of documentation related to Robot Framework automations. The most recent documentation is at https://robocorp.com/docs

RPA.Desktop.OperatingSystem

Get machine boot time

return:boot time in seconds from Epoch

Usage

${epoch} Boot Time In Seconds From Epoch

Get computer boot time in seconds from Epoch or in datetime string.

Arguments

ArgumentTypeDefault value
as_datetimeboolFalse
datetime_formatstr%Y-%m-%d %H:%M:%S
param as_datetime:if True returns datetime string, otherwise seconds, defaults to False
param datetime_format:datetime string format, defaults to "%Y-%m-%d %H:%M:%S"
return:seconds from Epoch or datetime string

Usage

${boottime} Get Boot Time ${boottime} Get Boot Time as_datetime=True ${boottime} Get Boot Time as_datetime=True datetime_format=%d.%m.%Y

Get machine name

return:machine name as string

Usage

${machine} Get Machine Name

Get computer memory stats and return those in bytes or in humanized memory format.

Arguments

ArgumentTypeDefault value
humanizedboolTrue
param humanized:if False returns memory information in bytes, defaults to True
return:memory information in dictionary format

Usage

&{mem} Get Memory Stats &{mem} Get Memory Stats humanized=False

Get username of logged in user

return:username as string

Usage

${user} Get Username

Kill process by name

Arguments

ArgumentTypeDefault value
process_namestrnull
param process_name:name of the process
return:True if succeeds False if not

Usage

${process} Process Exists calc strict=False ${status} Kill Process ${process.name()}

Kill process by pid

Arguments

ArgumentTypeDefault value
pidintnull
param pid:process identifier

Usage

${process} Process Exists calc strict=False ${status} Kill Process By PID ${process.pid}

Check if process exists by its name

Arguments

ArgumentTypeDefault value
process_namestrnull
strictboolTrue
param process_name:search for this process
param strict:defines how match is made, default True which means that process name needs to be exact match and False does inclusive matching
return:process instance or False

Usage

${process} Process Exists calc ${process} Process Exists calc strict=False

Check if process exists by its id

Arguments

ArgumentTypeDefault value
pidintnull
param pid:process identifier
return:process instance or False

Usage

${process} Process ID Exists 4567 Run Keyword If ${process} Log Process exists

Puts system to sleep mode

Usage

Put System To Sleep