Skip to content

Commit d5518d9

Browse files
authored
Merge pull request #57 from jetbrains-academy/stephen-hero-patch-50
Update task.md
2 parents 2a11848 + d3762da commit d5518d9

File tree

1 file changed

+10
-10
lines changed
  • page_object/first_tests_with_po/po_test

1 file changed

+10
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
<h2>Первый тест на основе&nbsp;Page Object</h2>
1+
<h2>First test based on&nbsp;Page Object</h2>
22

3-
<p>Ура, первый прототип страницы мы уже реализовали! Давайте теперь перепишем тест с помощью Page Object:&nbsp;</p>
3+
<p>Hooray, we've implemented the first prototype of the page! Now let's rewrite the test using the Page Object:&nbsp;</p>
44

5-
<p>1. Откройте файл с вашим тестом&nbsp;<em>test_main_page.py</em></p>
5+
<p>1. Open the file with your test,&nbsp;<em>test_main_page.py</em>.</p>
66

7-
<p>2. В самом верху файла нужно импортировать класс, описывающий главную страницу:&nbsp;</p>
7+
<p>2. At the very top of the file, you need to import the class describing the main page.&nbsp;</p>
88

9-
<p>3. Теперь преобразуем сам тест в <em>test_main_page.py</em>:&nbsp;</p>
9+
<p>3. Now let's transform the test itself in <em>test_main_page.py</em>:&nbsp;</p>
1010

1111
<pre>
1212
<code class="language-python">from .pages.main_page import MainPage
1313

1414

1515
def test_guest_can_go_to_login_page(browser):
16-
page = MainPage(browser, link) # initializing page object
17-
page.open() # opening page
18-
page.go_to_login_page() # using page method to open login page
16+
page = MainPage(browser, link) # initializing the page object
17+
page.open() # opening the page
18+
page.go_to_login_page() # using the page method to open the login page
1919
</code></pre>
2020

21-
<p>4. Убедитесь, что тест проходит, запустив его все той же командой:&nbsp;</p>
21+
<p>4. Make sure the test passes by running it with the same command:&nbsp;</p>
2222

2323
<pre>
2424
<code>pytest -v --tb=line --language=en test_main_page.py
2525
</code></pre>
2626

27-
<p>Теперь наш тест <strong>почти </strong>полностью написан в модном стиле Page Object! Почему <strong>почти&nbsp;</strong>&mdash; узнаете в следующих шагах.</p>
27+
<p>Now, our test is <strong>almost </strong>completely written in the trendy Page Object style! Why <strong>almost&nbsp;</strong>&mdash; you'll find out in the following steps.</p>

0 commit comments

Comments
 (0)