21
21
import org .openqa .selenium .By ;
22
22
import org .openqa .selenium .WebDriverException ;
23
23
import org .openqa .selenium .WebElement ;
24
- import org .openqa .selenium .internal .FindsByClassName ;
25
- import org .openqa .selenium .internal .FindsByCssSelector ;
26
- import org .openqa .selenium .internal .FindsById ;
27
- import org .openqa .selenium .internal .FindsByLinkText ;
28
- import org .openqa .selenium .internal .FindsByName ;
29
- import org .openqa .selenium .internal .FindsByTagName ;
30
- import org .openqa .selenium .internal .FindsByXPath ;
31
24
import org .openqa .selenium .remote .RemoteWebElement ;
32
25
import org .openqa .selenium .remote .Response ;
33
26
36
29
37
30
@ SuppressWarnings ({"unchecked" , "rawtypes" })
38
31
abstract class DefaultGenericMobileElement <T extends WebElement > extends RemoteWebElement
39
- implements FindsByClassName ,
40
- FindsByCssSelector , FindsById ,
41
- FindsByLinkText , FindsByName , FindsByTagName , FindsByXPath , FindsByFluentSelector <T >, FindsByAccessibilityId <T >,
42
- ExecutesMethod {
32
+ implements FindsByFluentSelector <T >, FindsByAccessibilityId <T >, ExecutesMethod {
43
33
44
34
@ Override public Response execute (String driverCommand , Map <String , ?> parameters ) {
45
35
return super .execute (driverCommand , parameters );
@@ -65,100 +55,6 @@ abstract class DefaultGenericMobileElement<T extends WebElement> extends RemoteW
65
55
return (T ) super .findElement (by , using );
66
56
}
67
57
68
- @ Override public List findElementsById (String id ) {
69
- return super .findElementsById (id );
70
- }
71
-
72
- @ Override public T findElementById (String id ) {
73
- return (T ) super .findElementById (id );
74
- }
75
-
76
- /**
77
- * Finds a single element by link text.
78
- *
79
- * @throws WebDriverException This method doesn't work against native app UI.
80
- */
81
- public T findElementByLinkText (String using ) throws WebDriverException {
82
- return (T ) super .findElementByLinkText (using );
83
- }
84
-
85
- /**
86
- * Finds many elements by link text.
87
- *
88
- * @throws WebDriverException This method doesn't work against native app UI.
89
- */
90
- public List findElementsByLinkText (String using ) throws WebDriverException {
91
- return super .findElementsByLinkText (using );
92
- }
93
-
94
- /**
95
- * Finds a single element by partial link text.
96
- *
97
- * @throws WebDriverException This method doesn't work against native app UI.
98
- */
99
- public T findElementByPartialLinkText (String using ) throws WebDriverException {
100
- return (T ) super .findElementByPartialLinkText (using );
101
- }
102
-
103
- /**
104
- * Finds many elements by partial link text.
105
- *
106
- * @throws WebDriverException This method doesn't work against native app UI.
107
- */
108
- public List findElementsByPartialLinkText (String using ) throws WebDriverException {
109
- return super .findElementsByPartialLinkText (using );
110
- }
111
-
112
- public T findElementByTagName (String using ) {
113
- return (T ) super .findElementByTagName (using );
114
- }
115
-
116
- public List findElementsByTagName (String using ) {
117
- return super .findElementsByTagName (using );
118
- }
119
-
120
- public T findElementByName (String using ) {
121
- return (T ) super .findElementByName (using );
122
- }
123
-
124
- public List findElementsByName (String using ) {
125
- return super .findElementsByName (using );
126
- }
127
-
128
- public T findElementByClassName (String using ) {
129
- return (T ) super .findElementByClassName (using );
130
- }
131
-
132
- public List findElementsByClassName (String using ) {
133
- return super .findElementsByClassName (using );
134
- }
135
-
136
- /**
137
- * Finds a single element by CSS selector.
138
- *
139
- * @throws WebDriverException This method doesn't work against native app UI.
140
- */
141
- public T findElementByCssSelector (String using ) throws WebDriverException {
142
- return (T ) super .findElementByCssSelector (using );
143
- }
144
-
145
- /**
146
- * Finds many elements by CSS selector.
147
- *
148
- * @throws WebDriverException This method doesn't work against native app UI.
149
- */
150
- public List findElementsByCssSelector (String using ) throws WebDriverException {
151
- return super .findElementsByCssSelector (using );
152
- }
153
-
154
- public T findElementByXPath (String using ) {
155
- return (T ) super .findElementByXPath (using );
156
- }
157
-
158
- public List findElementsByXPath (String using ) {
159
- return super .findElementsByXPath (using );
160
- }
161
-
162
58
/**
163
59
* {@inheritDoc}
164
60
*
0 commit comments