File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
src/main/java/com/epam/healenium/appium/service Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 10
10
<modelVersion >4.0.0</modelVersion >
11
11
<groupId >com.epam.healenium</groupId >
12
12
<artifactId >healenium-appium</artifactId >
13
- <version >1.5.10 </version >
13
+ <version >1.5.11 </version >
14
14
<packaging >jar</packaging >
15
15
<name >healenium-appium</name >
16
16
<description >healenium appium client</description >
55
55
56
56
57
57
<properties >
58
- <healenium .version>3.5.3 </healenium .version>
58
+ <healenium .version>3.5.4 </healenium .version>
59
59
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
60
60
<typesafe .version>1.3.4</typesafe .version>
61
61
<commonslang3 .version>3.11</commonslang3 .version>
Original file line number Diff line number Diff line change 5
5
import com .epam .healenium .treecomparing .Node ;
6
6
import com .epam .healenium .treecomparing .NodeBuilder ;
7
7
import lombok .extern .slf4j .Slf4j ;
8
+ import org .apache .commons .lang3 .StringUtils ;
8
9
import org .jsoup .Jsoup ;
9
10
import org .jsoup .nodes .Attribute ;
10
11
import org .jsoup .nodes .Document ;
@@ -81,11 +82,12 @@ private Node toNode(Element e) {
81
82
List <Attribute > list = e .attributes ().asList ();
82
83
list .forEach (attr -> otherAttributes .put (attr .getKey (), attr .getValue ()));
83
84
85
+ String index = e .attributes ().getIgnoreCase ("index" );
84
86
return new NodeBuilder ()
85
87
.setId (e .attributes ().getIgnoreCase ("resource-id" ))
86
88
.setTag (e .attributes ().getIgnoreCase ("class" ))
87
89
.setClasses (Collections .singleton (e .attributes ().getIgnoreCase ("content-desc" )))
88
- .setIndex (Integer . parseInt ( e . attributes (). getIgnoreCase ( " index" ) ))
90
+ .setIndex (StringUtils . isEmpty ( index ) ? 0 : Integer . parseInt ( index ))
89
91
.setMobileAttributes (otherAttributes )
90
92
.build ();
91
93
}
You can’t perform that action at this time.
0 commit comments