Need help in converting string value to enum

Hi All,

Can someone please help in converting String value to enum for testing on scenario.

Variable name is of type class (created in vs code form). For testing the scenario, I need to pass the String value dynamically, but it is throwing error that String is not compatible with property type.

please help
thanks

Similiar to we can do: