diff --git a/README.md b/README.md index f97995aa..546b2f16 100755 --- a/README.md +++ b/README.md @@ -5,21 +5,23 @@ -

SeleniumBase

- -

Reliable web automation and testing with Python/pytest.

+

SeleniumBase

+

A complete end-to-end testing experience.

+

Extends Selenium/WebDriver and pytest.

PyPI version GitHub version SeleniumBase Docs SeleniumBase GitHub Actions SeleniumBase

+

SeleniumBase is an all-in-one framework for reliable browser automation, end-to-end testing, reports, charts, presentations, and website tours. Tests are run with pytest. Browsers are controlled by WebDriver.

+

-🚀 Start | -🗂️ Features | -👩‍🏫 Examples | -🖥️ Options | +🐣 Start | +🏞️ Features | +👨‍🏫 Examples | +☑️ Options | 🧙 Scripts | 📱 Mobile
-📗 API | +📒 API | 🔠 Syntaxes | 🔵 Dashboard | 🔴 Recorder | @@ -28,17 +30,17 @@
🎖️ GUI | 📰 TestPage | -🌏 Translator | +🈺 Translator | 🎞️ Presenter | 📊 Charts | -🗺️ Tours +🚎 Tours
🤖 CI | ♻️ Boilerplates | 🔎 Inspector | 🕹️ JSCode | 🛂 Dialogs | -🖼️ Visual +🎭 Visual

-------- diff --git a/examples/translations/ReadMe.md b/examples/translations/ReadMe.md index 315f8eaf..e20d2ce7 100755 --- a/examples/translations/ReadMe.md +++ b/examples/translations/ReadMe.md @@ -1,21 +1,46 @@ -

- -

Language Tests (Python 3+)

+

🌏 Translated Tests 🈺

-SeleniumBase supports the following 10 languages: English, Chinese, Dutch, French, Italian, Japanese, Korean, Portuguese, Russian, and Spanish. +SeleniumBase supports the following 10 languages: English, Chinese, Dutch, French, Italian, Japanese, Korean, Portuguese, Russian, and Spanish. (Examples can be found in [SeleniumBase/examples/translations]) -Examples can be found in [SeleniumBase/examples/translations]. +Multi-language tests run with **pytest** like other tests. Test methods have a one-to-one mapping to supported languages. Here's an example of a translated test: -Multi-language tests are run with **pytest** like any other test. Every test method has a one-to-one mapping to every other supported language. Example: +```python +# Chinese Translation +from seleniumbase.translate.chinese import 硒测试用例 + +class 我的测试类(硒测试用例): + def test_例子1(self): + self.开启("https://zh.wikipedia.org/wiki/") + self.断言标题("维基百科,自由的百科全书") + self.断言元素('a[title="首页"]') + self.断言文本("新闻动态", "span#新闻动态") + self.输入文本("#searchInput", "舞龍") + self.单击("#searchButton") + self.断言文本("舞龍", "#firstHeading") ``` -self.open(URL) <=> self.开启网址(URL) + +Here's another example: + +```python +# Japanese Translation +from seleniumbase.translate.japanese import セレニウムテストケース + +class 私のテストクラス(セレニウムテストケース): + def test_例1(self): + self.を開く("https://ja.wikipedia.org/wiki/") + self.テキストを確認する("ウィキペディア") + self.要素を確認する('[title="メインページに移動する"]') + self.入力("#searchInput", "アニメ") + self.クリックして("#searchButton") + self.テキストを確認する("アニメ", "#firstHeading") + self.入力("#searchInput", "寿司") ``` -

Translation API

+

Translation API 🈺

-You can use SeleniumBase to selectively translate the method names of any test from one language to another via the console scripts interface. Additionally, the ``import`` line at the top of the Python file will change to import the new ``BaseCase``. Example: ``BaseCase`` becomes ``CasoDeTeste`` when a test is translated into Portuguese. +You can use SeleniumBase to selectively translate the method names of any test from one language to another with the console scripts interface. Additionally, the ``import`` line at the top of the Python file will change to import the new ``BaseCase``. Example: ``BaseCase`` becomes ``CasoDeTeste`` when a test is translated into Portuguese. ```bash seleniumbase translate @@ -59,3 +84,7 @@ plus the 2-letter language code of the new language. (Example: Translating ``test_1.py`` into Japanese with ``-c`` will create a new file called ``test_1_ja.py``.) ``` + +-------- + +

diff --git a/help_docs/translations.md b/help_docs/translations.md index 817bde3c..e20d2ce7 100755 --- a/help_docs/translations.md +++ b/help_docs/translations.md @@ -1,15 +1,12 @@ -

- -

🌏 Language Tests & Translation API

+

🌏 Translated Tests 🈺

-SeleniumBase supports the following 10 languages: English, Chinese, Dutch, French, Italian, Japanese, Korean, Portuguese, Russian, and Spanish. +SeleniumBase supports the following 10 languages: English, Chinese, Dutch, French, Italian, Japanese, Korean, Portuguese, Russian, and Spanish. (Examples can be found in [SeleniumBase/examples/translations]) -Examples can be found in [SeleniumBase/examples/translations]. - -Multi-language tests are run with **pytest** like any other test. Test methods have a one-to-one mapping to the other supported languages. Here's an example of a translated test: +Multi-language tests run with **pytest** like other tests. Test methods have a one-to-one mapping to supported languages. Here's an example of a translated test: ```python +# Chinese Translation from seleniumbase.translate.chinese import 硒测试用例 class 我的测试类(硒测试用例): @@ -23,8 +20,25 @@ class 我的测试类(硒测试用例): self.断言文本("舞龍", "#firstHeading") ``` +Here's another example: + +```python +# Japanese Translation +from seleniumbase.translate.japanese import セレニウムテストケース + +class 私のテストクラス(セレニウムテストケース): + def test_例1(self): + self.を開く("https://ja.wikipedia.org/wiki/") + self.テキストを確認する("ウィキペディア") + self.要素を確認する('[title="メインページに移動する"]') + self.入力("#searchInput", "アニメ") + self.クリックして("#searchButton") + self.テキストを確認する("アニメ", "#firstHeading") + self.入力("#searchInput", "寿司") +``` + -

Translation API

+

Translation API 🈺

You can use SeleniumBase to selectively translate the method names of any test from one language to another with the console scripts interface. Additionally, the ``import`` line at the top of the Python file will change to import the new ``BaseCase``. Example: ``BaseCase`` becomes ``CasoDeTeste`` when a test is translated into Portuguese.