Skip to content

Commit 87aecd7

Browse files
committed
Add an example test in Portuguese
1 parent fdb199d commit 87aecd7

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Portuguese Language Test - Python 3 Only!
2+
from seleniumbase.translate.portuguese import CasoDeTeste
3+
4+
5+
class MinhaClasseDeTeste(CasoDeTeste):
6+
7+
def test_exemplo_1(self):
8+
self.abrir_url("https://pt.wikipedia.org/wiki/")
9+
self.verificar_texto("Wikipédia")
10+
self.verificar_elemento('[title="Visitar a página principal"]')
11+
self.atualizar_texto("#searchInput", "Rio de Janeiro")
12+
self.clique("#searchButton")
13+
self.verificar_texto("Rio de Janeiro", "#firstHeading")
14+
self.verificar_elemento('img[alt*="edifícios"]')
15+
self.atualizar_texto("#searchInput", "São Paulo")
16+
self.clique("#searchButton")
17+
self.verificar_texto("São Paulo", "#firstHeading")
18+
self.verificar_elemento('img[src*="Monumento"]')
19+
self.voltar()
20+
self.verificar_verdade("Janeiro" in self.obter_url_atual())
21+
self.avançar() # noqa
22+
self.verificar_verdade("Paulo" in self.obter_url_atual())

0 commit comments

Comments
 (0)