SeleniumBase/examples/translations/japanese_test_1.py

23 lines
1.2 KiB
Python
Raw Normal View History

2020-04-19 08:50:54 +08:00
# Japanese Language Test
from seleniumbase.translate.japanese import セレニウムテストケース # noqa
2020-03-20 12:31:30 +08:00
2020-04-19 08:50:54 +08:00
class 私のテストクラス(セレニウムテストケース):
2020-03-20 12:31:30 +08:00
def test_例1(self):
self.を開く("https://ja.wikipedia.org/wiki/")
2020-03-20 12:31:30 +08:00
self.テキストを確認する("ウィキペディア")
self.要素を確認する('[title="メインページに移動する"]')
2020-06-13 13:59:04 +08:00
self.入力("#searchInput", "アニメ")
2020-03-20 12:31:30 +08:00
self.クリックして("#searchButton")
self.テキストを確認する("アニメ", "#firstHeading")
2020-06-13 13:59:04 +08:00
self.入力("#searchInput", "寿司")
2020-03-20 12:31:30 +08:00
self.クリックして("#searchButton")
self.テキストを確認する("寿司", "#firstHeading")
self.要素を確認する('img[alt="握り寿司"]')
2020-06-13 13:59:04 +08:00
self.入力("#searchInput", "レゴランド・ジャパン")
2020-04-27 13:02:12 +08:00
self.クリックして("#searchButton")
self.要素を確認する('img[alt="Legoland japan.jpg"]')
self.リンクテキストを確認する("名古屋城")
self.リンクテキストをクリックします("テーマパーク")
self.テキストを確認する("テーマパーク", "#firstHeading")