Skip to content

Commit 2307824

Browse files
committed
Add core() usage
1 parent 1d0442e commit 2307824

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

config/checkstyle/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
</module>
336336
<module name="RegexpSingleline">
337337
<property name="severity" value="error" />
338-
<property name="format" value="(?&lt;!\.)(css|hasClass|hasAttribute|attr|find|finds)\(" />
338+
<property name="format" value="(?&lt;!\.)(css|hasClass|hasAttribute|attr|find|finds)\((?!@|\)|String)" />
339339
<property name="message" value="core() should be used with these methods" />
340340
<property name="id" value="CoreMethodsUnused_Error" />
341341
</module>

jdi-light-mobile/src/main/java/com/epam/jdi/light/mobile/elements/base/MobileAppUIElement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ public void dragAndDropTo(int xOffset, int yOffset) {
144144

145145
@Override
146146
protected boolean enabled() {
147-
if (hasAttribute("enabled")) {
147+
if (core().hasAttribute("enabled")) {
148148
return true;
149149
}
150-
if (hasAttribute("disabled")) {
150+
if (core().hasAttribute("disabled")) {
151151
return false;
152152
}
153153
return getWebElement().isEnabled();

jdi-light-mobile/src/main/java/com/epam/jdi/light/mobile/elements/base/MobileUIElement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,10 @@ public MapArray<String, String> getAllAttributes() {
325325

326326
@Override
327327
protected boolean enabled() {
328-
if (hasClass("active") || hasAttribute("enabled")) {
328+
if (core().hasClass("active") || core().hasAttribute("enabled")) {
329329
return true;
330330
}
331-
if (hasClass("disabled")) {
331+
if (core().hasClass("disabled")) {
332332
return false;
333333
}
334334
return getWebElement().isEnabled();

0 commit comments

Comments
 (0)