Changing Keyword Case in Selenium Library using a setting

By default all keywords are in Title Case but I would prefer lower case. Is there a global setting to achieve this goal and if so, how do I invoke the setting?

Preferred Method:

press keys              //input[@id='userName']  \ue004
page should contain     Username is required
press keys              //input[@id='password']  \ue004
page should contain     Password is required
element should be disabled    //input[@id='submitButton']

Keywords are not case and space sensitive, you can write them in any way you like. Here are some examples of valid calling of a keyword (from SeleniumLibrary):

  • Press Keys
  • press keys
  • preSSkeys
  • Press_Keys
  • press_keys
  • presskeys

You may be talking about some external function from Robot Framework, like an IDE, or tool.

1 Like

The default style is Title Case, but if you have a different house style that is ok. As per the previous reply casing does not effect execution. Maybe you are running into a setting with Robocop? In which case I would go to the documentation for setting up a pyproject.toml file for your project.

1 Like

Also robotframework-tidy is good tool for enforce the style you want to use.

1 Like

I was not clear - the issue is my IDE is PyCharm and using Robot Framework Language Server. I will look at “tidy”

See GitHub - MarketSquare/robotframework-tidy: Robot Framework code formatter