-
Notifications
You must be signed in to change notification settings - Fork 0
/
RepositoryForObject.py
112 lines (84 loc) · 3.39 KB
/
RepositoryForObject.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
104
105
106
107
108
109
110
111
112
class ObjectRepository:
def __init__(self):
print()
def getUsernameforMongoDB(self):
username = "[email protected]"
return username
def getPasswordforMongoDB(self):
password = "Kavita@123"
return password
def getLoginCloseButton(self):
login_close_button = "//body[1]/div[2]/div[1]/div[1]/button[1]"
return login_close_button
def getInputSearchArea(self):
search_inputarea = "/html[1]/body[1]/div[1]/div[1]/div[1]/div[1]/div[2]/div[2]/form[1]/div[1]/div[1]/input[1]"
return search_inputarea
def getElementTobeSearched(self):
element = "_10Ermr"
return element
def getSearchButton(self):
search_button = "/html[1]/body[1]/div[1]/div[1]/div[1]/div[1]/div[2]/div[2]/form[1]/div[1]/button[1]"
return search_button
def getRatingandReviewsText(self):
rating_and_review_text = "//div[contains(text(),'Ratings & Reviews')]"
return rating_and_review_text
def getProductNameByXpath(self):
product_name = "//body[1]/div[1]/div[1]/div[3]/div[1]/div[2]/div[2]/div[1]/div[1]/h1[1]/span[2]"
return product_name
def getProductNameByClass(self):
product_name = "B_NuCI"
return product_name
def getProductSearchedByXpath(self):
product_searched = "//body[1]/div[1]/div[1]/div[3]/div[1]/div[2]/div[2]/div[1]/div[1]/h1[1]/span[1]"
return product_searched
def getProductSearchedByClass(self):
product_searched = "G6XhRU"
return product_searched
def getOriginalPriceUsingClass(self):
original_price = "_30jeq3"
return original_price
def getOriginalPriceUsingXpath(self):
original_price = "//body[1]/div[1]/div[1]/div[3]/div[1]/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/div[1]"
return original_price
def getDiscountPercent(self):
discount_percent = "_3Ay6Sb"
return discount_percent
def getEMIDetail(self):
emi_detail = "//body[1]/div[1]/div[1]/div[3]/div[1]/div[2]/div[3]/div[2]/div[1]/div[1]/span[3]/li[1]/span[1]"
return emi_detail
def getViewPlanLinkUsingClass(self):
viewPlan = "_3IATq1"
return viewPlan
def getAvailableOffers(self):
available_offers1 = "_3TT44I"
available_offers2 = "WT_FyS"
return available_offers1, available_offers2
def getMoreOffers(self):
more_offer = "IMZJg1"
return more_offer
def getMoreOffersUsingClass(self):
more_offer = "IMZJg1 Okf99z"
return more_offer
def getRatings(self):
rating = "div._3LWZlK._1BLPMq"
return rating
def getComment(self):
comment1 = "_6K-7Co"
comment2 = "_2-N8zT"
return comment1,comment2
def getCustomerName(self):
comment_date = "_2sc7ZR"
return comment_date
def getTotalReviewPage(self):
total_page_1 = "_2MImiq"
#total_page_2 ="//body[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[2]/div[13]/div[1]/div[1]/span[1]"
return total_page_1
#
def getMoreReviewUsingClass(self):
more_review_1 = "_3at_-o"
more_review_2 = "_3UAT2v"
return more_review_1, more_review_2
#
def getNextFromTotalReviewPage(self):
next_button = "_1LKTO3"
return next_button