-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_about.py
More file actions
65 lines (40 loc) · 2.17 KB
/
Copy pathtest_about.py
File metadata and controls
65 lines (40 loc) · 2.17 KB
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
from seleniumbase import BaseCase
class TestAboutPage(BaseCase):
def test_assert_equal(self):
self.open("https://practice-react.sdetunicorns.com/about")
welcome_text = self.get_text('.welcome-content h5')
self.assert_equal(welcome_text, 'Who Are We')
def test_assert_true(self):
self.open("https://practice-react.sdetunicorns.com/about")
is_breadcrumb_visible = self.is_element_visible('.breadcrumb-area')
self.assert_true(is_breadcrumb_visible)
def test_assert_element_visible(self):
self.open("https://practice-react.sdetunicorns.com/about")
self.assert_element_visible('.banner-area')
def test_assert_element_present(self):
self.open("https://practice-react.sdetunicorns.com/about")
self.assert_element_present('#hidden-span')
def test_assert_in(self):
self.open("https://practice-react.sdetunicorns.com/about")
welcome_text = self.get_text('.welcome-content h1')
self.assert_in('Welcome', welcome_text)
def test_assert_attribute(self):
self.open("https://practice-react.sdetunicorns.com/about")
self.assert_attribute('.breadcrumb-content a', 'aria-current', 'page')
def test_assert_false(self):
self.open("https://practice-react.sdetunicorns.com/about")
hidden_span = self.is_element_visible('#hidden-span') # false
self.assert_false(hidden_span)
def test_assert_not_equal(self):
self.open("https://practice-react.sdetunicorns.com/about")
header_offer = self.get_text('.header-offer span') # $200
self.assert_not_equal(header_offer, '$0')
def test_assert_element_not_visible(self):
self.open("https://practice-react.sdetunicorns.com/about")
self.assert_element_not_visible('#hidden-span')
def test_assert_text_not_visible(self):
self.open("https://practice-react.sdetunicorns.com/about")
self.assert_text_not_visible('$0', '.header-offer span')
def test_assert_attribute_not_present(self):
self.open("https://practice-react.sdetunicorns.com/about")
self.assert_attribute_not_present('.breadcrumb-content a', 'href', 'google.com')