@@ -450,9 +450,10 @@ class 我的测试类(硒测试用例):
450
450
self .开启(" https://zh.wikipedia.org/wiki/" )
451
451
self .断言标题(" 维基百科,自由的百科全书" )
452
452
self .断言元素(' a[title="Wikipedia:关于"]' )
453
+ self .如果可见请单击(' button[aria-label="关闭"]' )
454
+ self .如果可见请单击(' button[aria-label="關閉"]' )
453
455
self .断言元素(' span:contains("创建账号")' )
454
456
self .断言元素(' span:contains("登录")' )
455
- self .断言文本(" 新闻动态" , " span#新闻动态" )
456
457
self .输入文本(' input[name="search"]' , " 舞龍" )
457
458
self .单击(' button:contains("搜索")' )
458
459
self .断言文本(" 舞龍" , " #firstHeading" )
@@ -484,14 +485,14 @@ Testgeval.main(__name__, __file__)
484
485
class MijnTestklasse (Testgeval ):
485
486
def test_voorbeeld_1 (self ):
486
487
self .openen(" https://nl.wikipedia.org/wiki/Hoofdpagina" )
487
- self .controleren_element(' a[title*="hoofdpagina gaan "]' )
488
+ self .controleren_element(' a[title*="Welkom voor nieuwkomers "]' )
488
489
self .controleren_tekst(" Welkom op Wikipedia" , " td.hp-welkom" )
489
- self .typ(" #searchInput " , " Stroopwafel" )
490
- self .klik(" #searchButton " )
490
+ self .typ(" #searchform input " , " Stroopwafel" )
491
+ self .klik(" #searchform button " )
491
492
self .controleren_tekst(" Stroopwafel" , " #firstHeading" )
492
493
self .controleren_element(' img[src*="Stroopwafels"]' )
493
- self .typ(" #searchInput " , " Rijksmuseum Amsterdam" )
494
- self .klik(" #searchButton " )
494
+ self .typ(" #searchform input " , " Rijksmuseum Amsterdam" )
495
+ self .klik(" #searchform button " )
495
496
self .controleren_tekst(" Rijksmuseum" , " #firstHeading" )
496
497
self .controleren_element(' img[src*="Rijksmuseum"]' )
497
498
self .terug()
@@ -517,6 +518,7 @@ class MaClasseDeTest(CasDeBase):
517
518
self .ouvrir(" https://fr.wikipedia.org/wiki/" )
518
519
self .vérifier_texte(" Wikipédia" )
519
520
self .vérifier_élément(' [alt="Wikipédia"]' )
521
+ self .cliquer_si_affiché(' button[aria-label="Close"]' )
520
522
self .js_taper(" #searchform input" , " Crème brûlée" )
521
523
self .cliquer(" #searchform button" )
522
524
self .vérifier_texte(" Crème brûlée" , " #firstHeading" )
@@ -674,7 +676,7 @@ class МойТестовыйКласс(ТестНаСелен):
674
676
def test_пример_1(self ):
675
677
self .открыть(" https://ru.wikipedia.org/wiki/" )
676
678
self .подтвердить_элемент(' [title="Русский язык"]' )
677
- self .подтвердить_текст(" Википедия" , " h2 .main-wikimedia-header" )
679
+ self .подтвердить_текст(" Википедия" , " div .main-wikimedia-header" )
678
680
self .введите(" #searchInput" , " МГУ" )
679
681
self .нажмите(" #searchButton" )
680
682
self .подтвердить_текст(" университет" , " #firstHeading" )
0 commit comments