@@ -14,10 +14,10 @@ class 我的测试类(硒测试用例):
1414 def test_例子1 (self ):
1515 self .开启(" https://zh.wikipedia.org/wiki/" )
1616 self .断言标题(" 维基百科,自由的百科全书" )
17- self .断言元素(' a[title="首页 "]' )
17+ self .断言元素(' a[title="Wikipedia:关于 "]' )
1818 self .断言文本(" 新闻动态" , " span#新闻动态" )
19- self .输入文本(" #searchInput " , " 舞龍" )
20- self .单击(" #searchButton " )
19+ self .输入文本(' input[name="search"] ' , " 舞龍" )
20+ self .单击(' button:contains("搜索") ' )
2121 self .断言文本(" 舞龍" , " #firstHeading" )
2222```
2323
@@ -31,11 +31,11 @@ class 私のテストクラス(セレニウムテストケース):
3131 def test_例1 (self ):
3232 self .を開く(" https://ja.wikipedia.org/wiki/" )
3333 self .テキストを確認する(" ウィキペディア" )
34- self .要素を確認する(' [title="メインページに移動する "]' )
35- self .入力( " #searchInput " , " アニメ" )
36- self .クリックして(" #searchButton " )
34+ self .要素を確認する(' [title*="ウィキペディアへようこそ "]' )
35+ self .JS 入力( ' input[name="search"] ' , " アニメ" )
36+ self .クリックして(" #searchform button " )
3737 self .テキストを確認する(" アニメ" , " #firstHeading" )
38- self .入力( " #searchInput " , " 寿司" )
38+ self .JS 入力( ' input[name="search"] ' , " 寿司" )
3939```
4040
4141<a id =" translation_api " ></a >
0 commit comments