@@ -38,108 +38,108 @@ export class Screen {
38
38
}
39
39
40
40
showDialogConfirm = async ( title ) => {
41
- const btnShowDialogConfirm = await this . _driver . findElementByText ( title ) ;
41
+ const btnShowDialogConfirm = await this . _driver . findElementByAutomationText ( title ) ;
42
42
await btnShowDialogConfirm . tap ( ) ;
43
43
}
44
44
45
45
loadedConfirmDialog = async ( dialogMessage ) => {
46
- const lblDialogMessage = await this . _driver . findElementByText ( dialogMessage ) ;
46
+ const lblDialogMessage = await this . _driver . findElementByAutomationText ( dialogMessage ) ;
47
47
assert . isTrue ( await lblDialogMessage . isDisplayed ( ) ) ;
48
48
console . log ( dialogMessage + " shown!" ) ;
49
49
}
50
50
51
51
closeDialog = async ( ) => {
52
- const btnYesDialog = await this . _driver . findElementByText ( confirmDialog ) ;
52
+ const btnYesDialog = await this . _driver . findElementByAutomationText ( confirmDialog ) ;
53
53
await btnYesDialog . click ( ) ;
54
54
}
55
55
56
56
loadedLogin = async ( ) => {
57
- const lblLogin = await this . _driver . findElementByText ( login ) ;
57
+ const lblLogin = await this . _driver . findElementByAutomationText ( login ) ;
58
58
assert . isTrue ( await lblLogin . isDisplayed ( ) ) ;
59
59
console . log ( login + " loaded!" ) ;
60
60
}
61
61
62
62
loadedHome = async ( ) => {
63
- const lblHome = await this . _driver . findElementByText ( home ) ;
63
+ const lblHome = await this . _driver . findElementByAutomationText ( home ) ;
64
64
assert . isTrue ( await lblHome . isDisplayed ( ) ) ;
65
65
console . log ( home + " loaded!" ) ;
66
66
}
67
67
68
68
loadedTabs = async ( ) => {
69
- const lblTabs = await this . _driver . findElementByText ( tabs ) ;
69
+ const lblTabs = await this . _driver . findElementByAutomationText ( tabs ) ;
70
70
assert . isTrue ( await lblTabs . isDisplayed ( ) ) ;
71
71
console . log ( tabs + " loaded!" ) ;
72
72
}
73
73
74
74
navigateToTabsPage = async ( ) => {
75
- const btnNavToTabsPage = await this . _driver . findElementByText ( gotoTabsPage ) ;
75
+ const btnNavToTabsPage = await this . _driver . findElementByAutomationText ( gotoTabsPage ) ;
76
76
await btnNavToTabsPage . tap ( ) ;
77
77
}
78
78
79
79
loadedPlayersList = async ( ) => {
80
- const lblPlayerList = await this . _driver . findElementByText ( playerList ) ;
80
+ const lblPlayerList = await this . _driver . findElementByAutomationText ( playerList ) ;
81
81
assert . isTrue ( await lblPlayerList . isDisplayed ( ) ) ;
82
82
console . log ( playerList + " loaded!" ) ;
83
83
}
84
84
85
85
loadedPlayerDetails = async ( player ) => {
86
- const lblPlayerDetail = await this . _driver . findElementByText ( playerDetails ) ;
86
+ const lblPlayerDetail = await this . _driver . findElementByAutomationText ( playerDetails ) ;
87
87
assert . isTrue ( await lblPlayerDetail . isDisplayed ( ) ) ;
88
88
89
- const lblPlayer = await this . _driver . findElementByText ( player + " Details" ) ;
89
+ const lblPlayer = await this . _driver . findElementByAutomationText ( player + " Details" ) ;
90
90
assert . isTrue ( await lblPlayer . isDisplayed ( ) ) ;
91
91
92
92
console . log ( player + " Details" + " loaded!" ) ;
93
93
}
94
94
95
95
loadedTeamList = async ( ) => {
96
- const lblTeamList = await this . _driver . findElementByText ( teamList , 10 ) ;
96
+ const lblTeamList = await this . _driver . findElementByAutomationText ( teamList , 10 ) ;
97
97
assert . isTrue ( await lblTeamList . isDisplayed ( ) ) ;
98
98
console . log ( teamList + " loaded!" ) ;
99
99
}
100
100
101
101
loadedTeamDetails = async ( team ) => {
102
- const lblTeamDetail = await this . _driver . findElementByText ( teamDetails ) ;
102
+ const lblTeamDetail = await this . _driver . findElementByAutomationText ( teamDetails ) ;
103
103
assert . isTrue ( await lblTeamDetail . isDisplayed ( ) ) ;
104
104
105
- const lblTeam = await this . _driver . findElementByText ( team + " Details" ) ;
105
+ const lblTeam = await this . _driver . findElementByAutomationText ( team + " Details" ) ;
106
106
assert . isTrue ( await lblTeam . isDisplayed ( ) ) ;
107
107
108
108
console . log ( team + " Details" + " loaded!" ) ;
109
109
}
110
110
111
111
navigateToHomePage = async ( homePageButton ?) => {
112
- const btnNavToHomePage = await this . _driver . findElementByText ( homePageButton || gotoHomePage ) ;
112
+ const btnNavToHomePage = await this . _driver . findElementByAutomationText ( homePageButton || gotoHomePage ) ;
113
113
await btnNavToHomePage . tap ( ) ;
114
114
}
115
115
116
116
navigateToPlayer = async ( player : string ) => {
117
- const btnNavPlayerPage = await this . _driver . findElementByText ( player ) ;
117
+ const btnNavPlayerPage = await this . _driver . findElementByAutomationText ( player ) ;
118
118
await btnNavPlayerPage . tap ( ) ;
119
119
}
120
120
121
121
navigateToNextPlayer = async ( ) => {
122
- const btnNavPlayerNextPage = await this . _driver . findElementByText ( gotoNextPlayer ) ;
122
+ const btnNavPlayerNextPage = await this . _driver . findElementByAutomationText ( gotoNextPlayer ) ;
123
123
await btnNavPlayerNextPage . tap ( ) ;
124
124
}
125
125
126
126
navigateToPlayers = async ( ) => {
127
- const btnNavPlayersPage = await this . _driver . findElementByText ( gotoPlayers ) ;
127
+ const btnNavPlayersPage = await this . _driver . findElementByAutomationText ( gotoPlayers ) ;
128
128
await btnNavPlayersPage . tap ( ) ;
129
129
}
130
130
131
131
navigateToTeam = async ( team : string ) => {
132
- const btnNavTeamPage = await this . _driver . findElementByText ( team ) ;
132
+ const btnNavTeamPage = await this . _driver . findElementByAutomationText ( team ) ;
133
133
await btnNavTeamPage . tap ( ) ;
134
134
}
135
135
136
136
navigateToNextTeam = async ( ) => {
137
- const btnNavTeamNextPage = await this . _driver . findElementByText ( gotoNextTeam ) ;
137
+ const btnNavTeamNextPage = await this . _driver . findElementByAutomationText ( gotoNextTeam ) ;
138
138
await btnNavTeamNextPage . tap ( ) ;
139
139
}
140
140
141
141
navigateToTeams = async ( ) => {
142
- const btnNavTeamsPage = await this . _driver . findElementByText ( gotoTeams ) ;
142
+ const btnNavTeamsPage = await this . _driver . findElementByAutomationText ( gotoTeams ) ;
143
143
await btnNavTeamsPage . tap ( ) ;
144
144
}
145
145
}
0 commit comments