-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.py
103 lines (92 loc) · 2.87 KB
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
from selenium import webdriver
from selenium.webdriver.common.by import By
from pages.main_page import MainPage
from pages.locators import YandexPageLocators
from pages.yandexPage import YandexPage
from pages.wsjPage import WSJPage
from pages.techcrunchPage import TechCrunchPage
class TestYandex():
def test_search_yandex(self, browser):
try:
link = "https://yandex.ru"
pages = YandexPage(browser, link)
pages.open()
pages.check_equal_url_and_input_date()
finally:
browser.quit()
def test_successful_login_in_yandex_mail(self, browser):
try:
test_login = input("Введите, пожалуйста, логин: ")
test_passwd = input("Введите, пожалуйста, пароль: ")
link = "https://yandex.ru"
pages = YandexPage(browser, link)
pages.open()
pages.successful_login_in_yandex_mail(test_login, test_passwd)
finally:
browser.quit()
class TestWSJ():
def test_on_start_page_wsj_link_signin(self, browser):
try:
link = "https://www.wsj.com/"
pages = WSJPage(browser, link)
pages.open()
pages.check_link_sign_in()
finally:
browser.quit()
def test_on_start_page_wsj_link_subscribe(self, browser):
try:
link = "https://www.wsj.com/"
pages = WSJPage(browser, link)
pages.open()
pages.check_link_subscribe()
finally:
browser.quit()
def test_on_start_page_button_africa (self, browser):
try:
link = "https://www.wsj.com/"
pages = WSJPage(browser, link)
pages.open()
pages.check_link_africa(browser)
finally:
browser.quit()
def test_on_start_page_button_search(self, browser):
try:
link = "https://www.wsj.com/"
pages = WSJPage(browser, link)
pages.open()
pages.check_button_search()
finally:
browser.quit()
class TestTechCrunch():
def test_on_start_page_link_login(self,browser):
try:
link = "https://techcrunch.com/"
pages = TechCrunchPage(browser, link)
pages.open()
pages.check_link_login_on_start_page(browser)
finally:
browser.quit()
def test_on_start_page_right_list_startup_battlefield(self, browser):
try:
link = "https://techcrunch.com/"
pages = TechCrunchPage(browser, link)
pages.open()
pages.check_startup_battlefield_in_right_list(browser)
finally:
browser.quit()
def test_on_start_page_link_to_trans_on_jp(self, browser):
try:
link = "https://techcrunch.com"
pages = TechCrunchPage(browser, link)
pages.open()
pages.check_link_translate_to_japan()
finally:
browser.quit()
def test_on_start_page_button_search(self, browser):
try:
link = "https://techcrunch.com"
pages = TechCrunchPage(browser, link)
pages.open()
pages.check_link_search()
finally:
browser.quit()