Skip to main content

SeleniumBase for Rust includes a small translator utility that maps simple action names into multiple languages. This is useful for localized test reports or for teams that prefer non-English step names.

Info

What you will learn

  • Which languages are supported.
  • How to translate action names.
  • How to use translated actions in tests.

Supported languages#

  • English
  • Chinese (中文)
  • Spanish (Español)
  • German (Deutsch)
  • French (Français)
  • Portuguese (Português)

Translate an action#

Use in tests#

Add a new language#

Tip

Translations are stored in the Translator module. Add entries to the language map to support additional languages, then rebuild.

When to use#

  • Writing tests for localized products.
  • Generating readable reports in different languages.

Troubleshooting#

Translation returns the original word

Likely cause. Language not supported.

Fix. Use one of the supported language codes.

perform_named_action fails

Likely cause. Action name not mapped.

Fix. Check that the translated string exists in the action registry.