skeleton-ui 0.0.12 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +19 -3
- data/bin/skeleton +14 -5
- data/html/index.css +27 -0
- data/html/index.html +34 -0
- data/html/java.html +141 -0
- data/html/ruby.html +141 -0
- data/html/server.rb +9 -0
- data/html/template.html.erb +44 -0
- data/lib/skeleton.rb +22 -4
- data/lib/skeleton/base.rb +5 -0
- data/lib/skeleton/ios.rb +6 -2
- data/lib/skeleton/languages.rb +13 -0
- data/lib/skeleton/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ee835f042191dc5d9b1f8965207c85343d4f447e84e4031d253e8a5693cff84
|
4
|
+
data.tar.gz: 43cf9b138e3504bb241c904f83b7476f7463e9bedeebf6cb3556d89b2dbaf2c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f41d1362e26ef0c6ae9a01977ec6596b34c3d98015cfe8486da6634f1e22a056cb176985862d1a4f54faeb603cd93d781ba1bcf787679204cc52b17852965772
|
7
|
+
data.tar.gz: a2fca13369b1ca1f0c767a6e3460fb4c04fdd4e21418e9ff0f1b21a759653953eba68a34c4703371775025a3158f02a85cf69ab5b8c9c899387f7fcd09074e60
|
data/README.md
CHANGED
@@ -13,11 +13,15 @@ Prerequisites:
|
|
13
13
|
#### iOS
|
14
14
|
- Install [Xcode](https://developer.apple.com/xcode/download/).
|
15
15
|
- Install [Xcode Command Line Tools](http://railsapps.github.io/xcode-command-line-tools.html).
|
16
|
-
-
|
16
|
+
- For real devices you need to sign skeleton in xcodeproj ([like appium](https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md)).
|
17
17
|
|
18
18
|
Installation:
|
19
19
|
------
|
20
20
|
$ gem install skeleton-ui
|
21
|
+
|
22
|
+
Precondition:
|
23
|
+
------
|
24
|
+
$ skeleton server
|
21
25
|
|
22
26
|
Usage:
|
23
27
|
------
|
@@ -29,8 +33,9 @@ Usage:
|
|
29
33
|
|
30
34
|
COMMANDS:
|
31
35
|
|
32
|
-
|
33
|
-
|
36
|
+
server Run skeleton web-server
|
37
|
+
clear Clear user cache
|
38
|
+
scan Make screen objects
|
34
39
|
|
35
40
|
GLOBAL OPTIONS:
|
36
41
|
|
@@ -65,6 +70,17 @@ Usage:
|
|
65
70
|
EXAMPLES:
|
66
71
|
|
67
72
|
skeleton clear
|
73
|
+
|
74
|
+
$ skeleton server --help
|
75
|
+
|
76
|
+
EXAMPLES:
|
77
|
+
|
78
|
+
skeleton clear
|
79
|
+
|
80
|
+
Docs:
|
81
|
+
------
|
82
|
+
|
83
|
+
- [Setting up Skeleton for working with iOS real devices](https://github.com/forqa/skeleton/blob/master/docs/real-ios-device-config.md)
|
68
84
|
|
69
85
|
## License
|
70
86
|
|
data/bin/skeleton
CHANGED
@@ -14,7 +14,7 @@ module Skeleton
|
|
14
14
|
c.option '-p', '--platform PLATFORM', String, 'Set device platform: android or ios'
|
15
15
|
c.option '-u', '--udid UDID', String, 'Set device UDID'
|
16
16
|
c.option '-b', '--bundle BUNDLE', String, 'Set Bundle ID for your app [required for iOS]'
|
17
|
-
c.action do |
|
17
|
+
c.action do |_args, options|
|
18
18
|
Skeleton.new(options).run
|
19
19
|
end
|
20
20
|
end
|
@@ -23,10 +23,19 @@ module Skeleton
|
|
23
23
|
c.syntax = 'skeleton clear'
|
24
24
|
c.description = 'Clear user cache'
|
25
25
|
c.example 'description', 'skeleton clear'
|
26
|
-
c.action do |
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
c.action do |_args, _options|
|
27
|
+
base = Base.new
|
28
|
+
base.clear
|
29
|
+
base.log.info("Successfully clear user cache")
|
30
30
|
end
|
31
31
|
end
|
32
|
+
|
33
|
+
command :server do |c|
|
34
|
+
c.syntax = 'skeleton server'
|
35
|
+
c.description = 'Run skeleton web-server'
|
36
|
+
c.example 'description', 'skeleton server'
|
37
|
+
c.action do |_args, _options|
|
38
|
+
system('cd ../html/ && ruby server.rb')
|
39
|
+
end
|
40
|
+
end
|
32
41
|
end
|
data/html/index.css
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
.container-fluid {
|
2
|
+
max-width: 1240px;
|
3
|
+
}
|
4
|
+
|
5
|
+
.aside {
|
6
|
+
position: relative;
|
7
|
+
height: 100%;
|
8
|
+
}
|
9
|
+
|
10
|
+
.aside__img {
|
11
|
+
position: absolute;
|
12
|
+
left: 0;
|
13
|
+
right: 0;
|
14
|
+
bottom: 0;
|
15
|
+
top: 0;
|
16
|
+
-webkit-background-size: cover;
|
17
|
+
-o-background-size: cover;
|
18
|
+
background-size: cover;
|
19
|
+
background-position: center;
|
20
|
+
background-repeat: no-repeat;
|
21
|
+
}
|
22
|
+
|
23
|
+
.content {
|
24
|
+
background-color: #FFF;
|
25
|
+
padding: 3rem;
|
26
|
+
border: 1px solid #eee;
|
27
|
+
}
|
data/html/index.html
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Skeleton</title>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
7
|
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
|
8
|
+
<link rel="stylesheet" type="text/css" href="/index.css"/>
|
9
|
+
</head>
|
10
|
+
<body class="bg-light">
|
11
|
+
<div class="container-fluid">
|
12
|
+
<div class="py-5 text-center">
|
13
|
+
<img class="d-block mx-auto mb-4" src="https://getbootstrap.com/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72">
|
14
|
+
<h2>Skeleton</h2>
|
15
|
+
</div>
|
16
|
+
<div class="row" style="min-height: 300px;">
|
17
|
+
<div class="col-md-8">
|
18
|
+
<h2>Get it:</h2>
|
19
|
+
<a href="ruby.html">Ruby</a>
|
20
|
+
<br>
|
21
|
+
<a href="java.html">Java</a>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<footer class="my-5 pt-5 text-muted text-center text-small">
|
25
|
+
<p class="mb-1">© 2018-2033 forqa</p>
|
26
|
+
<ul class="list-inline">
|
27
|
+
<li class="list-inline-item"><a href="#">Privacy</a></li>
|
28
|
+
<li class="list-inline-item"><a href="#">Terms</a></li>
|
29
|
+
<li class="list-inline-item"><a href="#">Support</a></li>
|
30
|
+
</ul>
|
31
|
+
</footer>
|
32
|
+
</div>
|
33
|
+
</body>
|
34
|
+
</html>
|
data/html/java.html
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Skeleton</title>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
7
|
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
|
8
|
+
<link rel="stylesheet" type="text/css" href="/index.css"/>
|
9
|
+
</head>
|
10
|
+
<body class="bg-light">
|
11
|
+
<div class="container-fluid">
|
12
|
+
<div class="py-5 text-center">
|
13
|
+
<img class="d-block mx-auto mb-4" src="https://getbootstrap.com/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72">
|
14
|
+
<h2>Skeleton</h2>
|
15
|
+
</div>
|
16
|
+
<div class="row" style="min-height: 666px;">
|
17
|
+
<div class="col-md-4 mb-4">
|
18
|
+
<div class="aside" style="max-height: 666px;">
|
19
|
+
<div class="aside__img" style="background-image: url(screenshot.png);"></div>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="col-md-8">
|
23
|
+
<h4 class="mb-3">PageObjects:</h4>
|
24
|
+
<div class="content" id="content">
|
25
|
+
<pre><code>By myTargetDemo() {
|
26
|
+
return MobileBy.AccessibilityId("myTarget Demo");
|
27
|
+
}
|
28
|
+
|
29
|
+
By other1() {
|
30
|
+
return MobileBy.iOSNsPredicateString("label like 'myTarget Demo'");
|
31
|
+
}
|
32
|
+
|
33
|
+
By staticText2() {
|
34
|
+
return MobileBy.iOSNsPredicateString("label like '320x50 and 300x250 banners'");
|
35
|
+
}
|
36
|
+
|
37
|
+
By staticText3() {
|
38
|
+
return MobileBy.iOSNsPredicateString("label like 'Fullscreen banners'");
|
39
|
+
}
|
40
|
+
|
41
|
+
By staticText4() {
|
42
|
+
return MobileBy.iOSNsPredicateString("label like 'Banners'");
|
43
|
+
}
|
44
|
+
|
45
|
+
By staticText5() {
|
46
|
+
return MobileBy.iOSNsPredicateString("label like 'Interstitial Ads'");
|
47
|
+
}
|
48
|
+
|
49
|
+
By staticText6() {
|
50
|
+
return MobileBy.iOSNsPredicateString("label like 'Advertisement inside app'");
|
51
|
+
}
|
52
|
+
|
53
|
+
By staticText7() {
|
54
|
+
return MobileBy.iOSNsPredicateString("label like 'Instream video ads'");
|
55
|
+
}
|
56
|
+
|
57
|
+
By staticText8() {
|
58
|
+
return MobileBy.iOSNsPredicateString("label like 'Native Ads'");
|
59
|
+
}
|
60
|
+
|
61
|
+
By staticText9() {
|
62
|
+
return MobileBy.iOSNsPredicateString("label like 'Instream Ads'");
|
63
|
+
}
|
64
|
+
|
65
|
+
By staticText10() {
|
66
|
+
return MobileBy.iOSNsPredicateString("label like 'Insert your slotId and ad type'");
|
67
|
+
}
|
68
|
+
|
69
|
+
By staticText11() {
|
70
|
+
return MobileBy.iOSNsPredicateString("label like 'Ad unit'");
|
71
|
+
}
|
72
|
+
|
73
|
+
</code></pre>
|
74
|
+
</div>
|
75
|
+
<br>
|
76
|
+
<h4 class="mb-3">ElementsTree:</h4>
|
77
|
+
<div class="content" id="content">
|
78
|
+
<pre><code>
|
79
|
+
t = 1.48s Snapshot accessibility hierarchy for app with pid 38785
|
80
|
+
t = 1.49s Snapshot accessibility hierarchy for app with pid 38785
|
81
|
+
Attributes: Application, 0x6000003801a0, pid: 38785, {{0.0, 0.0}, {414.0, 736.0}}, label: 'myTargetDemo'
|
82
|
+
Element subtree:
|
83
|
+
→Application, 0x6000003801a0, pid: 38785, {{0.0, 0.0}, {414.0, 736.0}}, label: 'myTargetDemo'
|
84
|
+
Window, 0x60000019bfb0, Main Window, {{0.0, 0.0}, {414.0, 736.0}}
|
85
|
+
Other, 0x60000019fbd0, traits: 8589934592, {{0.0, 0.0}, {414.0, 736.0}}
|
86
|
+
NavigationBar, 0x60000019bee0, traits: 35192962023424, {{0.0, 20.0}, {414.0, 44.0}}, identifier: 'myTarget Demo'
|
87
|
+
Other, 0x6000003809c0, traits: 8590000128, {{144.3, 31.7}, {125.7, 20.3}}, label: 'myTarget Demo'
|
88
|
+
Other, 0x60000019ff10, traits: 8589934592, {{0.0, 0.0}, {414.0, 736.0}}
|
89
|
+
Other, 0x60000019fe40, traits: 8589934592, {{0.0, 0.0}, {414.0, 736.0}}
|
90
|
+
Other, 0x600000380a90, traits: 8589934592, {{0.0, 64.0}, {414.0, 672.0}}
|
91
|
+
Table, 0x600000380b60, traits: 35192962023424, {{0.0, 64.0}, {414.0, 672.0}}
|
92
|
+
Other, 0x600000380c30, traits: 8589934592, {{0.0, -104.0}, {414.0, 0.0}}
|
93
|
+
Cell, 0x600000380d00, traits: 8589934592, {{0.0, -104.0}, {414.0, 280.0}}
|
94
|
+
StaticText, 0x600000380dd0, traits: 8589934656, {{16.0, 129.0}, {108.3, 32.3}}, label: '320x50 and 300x250 banners'
|
95
|
+
StaticText, 0x604000391440, traits: 8589934656, {{218.0, 129.0}, {119.3, 16.3}}, label: 'Fullscreen banners'
|
96
|
+
StaticText, 0x60400019c3c0, traits: 8589934656, {{16.0, 102.0}, {72.3, 21.0}}, label: 'Banners'
|
97
|
+
StaticText, 0x60400019c2f0, traits: 8589934656, {{218.0, 102.0}, {124.7, 21.0}}, label: 'Interstitial Ads'
|
98
|
+
Cell, 0x60400019c220, traits: 8589934592, {{0.0, 176.0}, {414.0, 280.0}}
|
99
|
+
StaticText, 0x60400038ee10, traits: 8589934656, {{16.0, 409.0}, {134.0, 32.3}}, label: 'Advertisement inside app's content'
|
100
|
+
StaticText, 0x60400038eee0, traits: 8589934656, {{218.0, 409.0}, {118.3, 16.3}}, label: 'Instream video ads'
|
101
|
+
StaticText, 0x60400019c490, traits: 8589934656, {{16.0, 382.0}, {92.7, 21.0}}, label: 'Native Ads'
|
102
|
+
StaticText, 0x60400038ec70, traits: 8589934656, {{218.0, 382.0}, {113.7, 21.0}}, label: 'Instream Ads'
|
103
|
+
Cell, 0x60400038e860, traits: 8589934592, {{0.0, 456.0}, {414.0, 280.0}}
|
104
|
+
StaticText, 0x60400038ed40, traits: 8589934656, {{16.0, 689.0}, {134.7, 32.3}}, label: 'Insert your slotId and ad type'
|
105
|
+
StaticText, 0x604000390f60, traits: 8589934656, {{16.0, 662.0}, {62.0, 21.0}}, label: 'Ad unit'
|
106
|
+
Other, 0x604000390e90, traits: 8589934592, {{0.0, 736.0}, {414.0, 0.0}}
|
107
|
+
Window, 0x604000390dc0, {{0.0, 0.0}, {414.0, 736.0}}
|
108
|
+
Other, 0x604000390c20, traits: 8589934592, {{0.0, 0.0}, {414.0, 736.0}}
|
109
|
+
Other, 0x604000390cf0, traits: 8589934592, {{0.0, 736.0}, {414.0, 226.0}}
|
110
|
+
Window, 0x604000390b50, {{0.0, 0.0}, {414.0, 736.0}}
|
111
|
+
StatusBar, 0x6040003909b0, {{0.0, 0.0}, {414.0, 20.0}}
|
112
|
+
Other, 0x60400038f630, {{0.0, 0.0}, {414.0, 20.0}}
|
113
|
+
Other, 0x6040003923b0, {{0.0, 0.0}, {414.0, 20.0}}
|
114
|
+
Other, 0x6040003922e0, traits: 8388608, {{6.0, 0.0}, {39.0, 20.0}}
|
115
|
+
Other, 0x604000392b00, traits: 8388608, {{50.0, 0.0}, {14.0, 20.0}}, label: '3 of 3 Wi-Fi bars', value: SSID
|
116
|
+
Other, 0x604000392890, traits: 8389120, {{184.0, 0.0}, {50.0, 20.0}}, label: '5:58 PM'
|
117
|
+
Other, 0x604000391d30, traits: 8388608, {{374.0, 0.0}, {35.0, 20.0}}, label: '-100% battery power'
|
118
|
+
Path to element:
|
119
|
+
→Application, 0x6000003801a0, pid: 38785, {{0.0, 0.0}, {414.0, 736.0}}, label: 'myTargetDemo'
|
120
|
+
Query chain:
|
121
|
+
→Find: Application "ru.mail.adman" 0x6000000ba820
|
122
|
+
Output: {
|
123
|
+
Application, 0x6000003801a0, pid: 38785, {{0.0, 0.0}, {414.0, 736.0}}, label: 'myTargetDemo'
|
124
|
+
}
|
125
|
+
|
126
|
+
|
127
|
+
</code></pre>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
<footer class="my-5 pt-5 text-muted text-center text-small">
|
132
|
+
<p class="mb-1">© 2018-2033 forqa</p>
|
133
|
+
<ul class="list-inline">
|
134
|
+
<li class="list-inline-item"><a href="#">Privacy</a></li>
|
135
|
+
<li class="list-inline-item"><a href="#">Terms</a></li>
|
136
|
+
<li class="list-inline-item"><a href="#">Support</a></li>
|
137
|
+
</ul>
|
138
|
+
</footer>
|
139
|
+
</div>
|
140
|
+
</body>
|
141
|
+
</html>
|
data/html/ruby.html
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Skeleton</title>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
7
|
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
|
8
|
+
<link rel="stylesheet" type="text/css" href="/index.css"/>
|
9
|
+
</head>
|
10
|
+
<body class="bg-light">
|
11
|
+
<div class="container-fluid">
|
12
|
+
<div class="py-5 text-center">
|
13
|
+
<img class="d-block mx-auto mb-4" src="https://getbootstrap.com/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72">
|
14
|
+
<h2>Skeleton</h2>
|
15
|
+
</div>
|
16
|
+
<div class="row" style="min-height: 666px;">
|
17
|
+
<div class="col-md-4 mb-4">
|
18
|
+
<div class="aside" style="max-height: 666px;">
|
19
|
+
<div class="aside__img" style="background-image: url(screenshot.png);"></div>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="col-md-8">
|
23
|
+
<h4 class="mb-3">PageObjects:</h4>
|
24
|
+
<div class="content" id="content">
|
25
|
+
<pre><code>def my_target_demo
|
26
|
+
return :accessibility_id, "myTarget Demo"
|
27
|
+
end
|
28
|
+
|
29
|
+
def other1
|
30
|
+
return :predicate, "label like 'myTarget Demo'"
|
31
|
+
end
|
32
|
+
|
33
|
+
def static_text2
|
34
|
+
return :predicate, "label like '320x50 and 300x250 banners'"
|
35
|
+
end
|
36
|
+
|
37
|
+
def static_text3
|
38
|
+
return :predicate, "label like 'Fullscreen banners'"
|
39
|
+
end
|
40
|
+
|
41
|
+
def static_text4
|
42
|
+
return :predicate, "label like 'Banners'"
|
43
|
+
end
|
44
|
+
|
45
|
+
def static_text5
|
46
|
+
return :predicate, "label like 'Interstitial Ads'"
|
47
|
+
end
|
48
|
+
|
49
|
+
def static_text6
|
50
|
+
return :predicate, "label like 'Advertisement inside app'"
|
51
|
+
end
|
52
|
+
|
53
|
+
def static_text7
|
54
|
+
return :predicate, "label like 'Instream video ads'"
|
55
|
+
end
|
56
|
+
|
57
|
+
def static_text8
|
58
|
+
return :predicate, "label like 'Native Ads'"
|
59
|
+
end
|
60
|
+
|
61
|
+
def static_text9
|
62
|
+
return :predicate, "label like 'Instream Ads'"
|
63
|
+
end
|
64
|
+
|
65
|
+
def static_text10
|
66
|
+
return :predicate, "label like 'Insert your slotId and ad type'"
|
67
|
+
end
|
68
|
+
|
69
|
+
def static_text11
|
70
|
+
return :predicate, "label like 'Ad unit'"
|
71
|
+
end
|
72
|
+
|
73
|
+
</code></pre>
|
74
|
+
</div>
|
75
|
+
<br>
|
76
|
+
<h4 class="mb-3">ElementsTree:</h4>
|
77
|
+
<div class="content" id="content">
|
78
|
+
<pre><code>
|
79
|
+
t = 1.48s Snapshot accessibility hierarchy for app with pid 38785
|
80
|
+
t = 1.49s Snapshot accessibility hierarchy for app with pid 38785
|
81
|
+
Attributes: Application, 0x6000003801a0, pid: 38785, {{0.0, 0.0}, {414.0, 736.0}}, label: 'myTargetDemo'
|
82
|
+
Element subtree:
|
83
|
+
→Application, 0x6000003801a0, pid: 38785, {{0.0, 0.0}, {414.0, 736.0}}, label: 'myTargetDemo'
|
84
|
+
Window, 0x60000019bfb0, Main Window, {{0.0, 0.0}, {414.0, 736.0}}
|
85
|
+
Other, 0x60000019fbd0, traits: 8589934592, {{0.0, 0.0}, {414.0, 736.0}}
|
86
|
+
NavigationBar, 0x60000019bee0, traits: 35192962023424, {{0.0, 20.0}, {414.0, 44.0}}, identifier: 'myTarget Demo'
|
87
|
+
Other, 0x6000003809c0, traits: 8590000128, {{144.3, 31.7}, {125.7, 20.3}}, label: 'myTarget Demo'
|
88
|
+
Other, 0x60000019ff10, traits: 8589934592, {{0.0, 0.0}, {414.0, 736.0}}
|
89
|
+
Other, 0x60000019fe40, traits: 8589934592, {{0.0, 0.0}, {414.0, 736.0}}
|
90
|
+
Other, 0x600000380a90, traits: 8589934592, {{0.0, 64.0}, {414.0, 672.0}}
|
91
|
+
Table, 0x600000380b60, traits: 35192962023424, {{0.0, 64.0}, {414.0, 672.0}}
|
92
|
+
Other, 0x600000380c30, traits: 8589934592, {{0.0, -104.0}, {414.0, 0.0}}
|
93
|
+
Cell, 0x600000380d00, traits: 8589934592, {{0.0, -104.0}, {414.0, 280.0}}
|
94
|
+
StaticText, 0x600000380dd0, traits: 8589934656, {{16.0, 129.0}, {108.3, 32.3}}, label: '320x50 and 300x250 banners'
|
95
|
+
StaticText, 0x604000391440, traits: 8589934656, {{218.0, 129.0}, {119.3, 16.3}}, label: 'Fullscreen banners'
|
96
|
+
StaticText, 0x60400019c3c0, traits: 8589934656, {{16.0, 102.0}, {72.3, 21.0}}, label: 'Banners'
|
97
|
+
StaticText, 0x60400019c2f0, traits: 8589934656, {{218.0, 102.0}, {124.7, 21.0}}, label: 'Interstitial Ads'
|
98
|
+
Cell, 0x60400019c220, traits: 8589934592, {{0.0, 176.0}, {414.0, 280.0}}
|
99
|
+
StaticText, 0x60400038ee10, traits: 8589934656, {{16.0, 409.0}, {134.0, 32.3}}, label: 'Advertisement inside app's content'
|
100
|
+
StaticText, 0x60400038eee0, traits: 8589934656, {{218.0, 409.0}, {118.3, 16.3}}, label: 'Instream video ads'
|
101
|
+
StaticText, 0x60400019c490, traits: 8589934656, {{16.0, 382.0}, {92.7, 21.0}}, label: 'Native Ads'
|
102
|
+
StaticText, 0x60400038ec70, traits: 8589934656, {{218.0, 382.0}, {113.7, 21.0}}, label: 'Instream Ads'
|
103
|
+
Cell, 0x60400038e860, traits: 8589934592, {{0.0, 456.0}, {414.0, 280.0}}
|
104
|
+
StaticText, 0x60400038ed40, traits: 8589934656, {{16.0, 689.0}, {134.7, 32.3}}, label: 'Insert your slotId and ad type'
|
105
|
+
StaticText, 0x604000390f60, traits: 8589934656, {{16.0, 662.0}, {62.0, 21.0}}, label: 'Ad unit'
|
106
|
+
Other, 0x604000390e90, traits: 8589934592, {{0.0, 736.0}, {414.0, 0.0}}
|
107
|
+
Window, 0x604000390dc0, {{0.0, 0.0}, {414.0, 736.0}}
|
108
|
+
Other, 0x604000390c20, traits: 8589934592, {{0.0, 0.0}, {414.0, 736.0}}
|
109
|
+
Other, 0x604000390cf0, traits: 8589934592, {{0.0, 736.0}, {414.0, 226.0}}
|
110
|
+
Window, 0x604000390b50, {{0.0, 0.0}, {414.0, 736.0}}
|
111
|
+
StatusBar, 0x6040003909b0, {{0.0, 0.0}, {414.0, 20.0}}
|
112
|
+
Other, 0x60400038f630, {{0.0, 0.0}, {414.0, 20.0}}
|
113
|
+
Other, 0x6040003923b0, {{0.0, 0.0}, {414.0, 20.0}}
|
114
|
+
Other, 0x6040003922e0, traits: 8388608, {{6.0, 0.0}, {39.0, 20.0}}
|
115
|
+
Other, 0x604000392b00, traits: 8388608, {{50.0, 0.0}, {14.0, 20.0}}, label: '3 of 3 Wi-Fi bars', value: SSID
|
116
|
+
Other, 0x604000392890, traits: 8389120, {{184.0, 0.0}, {50.0, 20.0}}, label: '5:58 PM'
|
117
|
+
Other, 0x604000391d30, traits: 8388608, {{374.0, 0.0}, {35.0, 20.0}}, label: '-100% battery power'
|
118
|
+
Path to element:
|
119
|
+
→Application, 0x6000003801a0, pid: 38785, {{0.0, 0.0}, {414.0, 736.0}}, label: 'myTargetDemo'
|
120
|
+
Query chain:
|
121
|
+
→Find: Application "ru.mail.adman" 0x6000000ba820
|
122
|
+
Output: {
|
123
|
+
Application, 0x6000003801a0, pid: 38785, {{0.0, 0.0}, {414.0, 736.0}}, label: 'myTargetDemo'
|
124
|
+
}
|
125
|
+
|
126
|
+
|
127
|
+
</code></pre>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
<footer class="my-5 pt-5 text-muted text-center text-small">
|
132
|
+
<p class="mb-1">© 2018-2033 forqa</p>
|
133
|
+
<ul class="list-inline">
|
134
|
+
<li class="list-inline-item"><a href="#">Privacy</a></li>
|
135
|
+
<li class="list-inline-item"><a href="#">Terms</a></li>
|
136
|
+
<li class="list-inline-item"><a href="#">Support</a></li>
|
137
|
+
</ul>
|
138
|
+
</footer>
|
139
|
+
</div>
|
140
|
+
</body>
|
141
|
+
</html>
|
data/html/server.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Skeleton</title>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
7
|
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
|
8
|
+
<link rel="stylesheet" type="text/css" href="/index.css"/>
|
9
|
+
</head>
|
10
|
+
<body class="bg-light">
|
11
|
+
<div class="container-fluid">
|
12
|
+
<div class="py-5 text-center">
|
13
|
+
<img class="d-block mx-auto mb-4" src="https://getbootstrap.com/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72">
|
14
|
+
<h2>Skeleton</h2>
|
15
|
+
</div>
|
16
|
+
<div class="row" style="min-height: 666px;">
|
17
|
+
<div class="col-md-4 mb-4">
|
18
|
+
<div class="aside" style="max-height: 666px;">
|
19
|
+
<div class="aside__img" style="background-image: url(screenshot.png);"></div>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="col-md-8">
|
23
|
+
<h4 class="mb-3">PageObjects:</h4>
|
24
|
+
<div class="content" id="content">
|
25
|
+
<pre><code><%= @pageobject %></code></pre>
|
26
|
+
</div>
|
27
|
+
<br>
|
28
|
+
<h4 class="mb-3">ElementsTree:</h4>
|
29
|
+
<div class="content" id="content">
|
30
|
+
<pre><code><%= @elements_tree %></code></pre>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<footer class="my-5 pt-5 text-muted text-center text-small">
|
35
|
+
<p class="mb-1">© 2018-2033 forqa</p>
|
36
|
+
<ul class="list-inline">
|
37
|
+
<li class="list-inline-item"><a href="#">Privacy</a></li>
|
38
|
+
<li class="list-inline-item"><a href="#">Terms</a></li>
|
39
|
+
<li class="list-inline-item"><a href="#">Support</a></li>
|
40
|
+
</ul>
|
41
|
+
</footer>
|
42
|
+
</div>
|
43
|
+
</body>
|
44
|
+
</html>
|
data/lib/skeleton.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'erb'
|
1
2
|
require 'fileutils'
|
2
3
|
require 'nokogiri'
|
3
4
|
require 'logger'
|
@@ -9,6 +10,7 @@ require_relative 'skeleton/android'
|
|
9
10
|
|
10
11
|
module Skeleton
|
11
12
|
class Skeleton
|
13
|
+
include Language
|
12
14
|
|
13
15
|
attr_accessor :platform, :udid, :bundle_id
|
14
16
|
|
@@ -42,10 +44,26 @@ module Skeleton
|
|
42
44
|
end
|
43
45
|
|
44
46
|
def run
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
47
|
+
@driver.clear
|
48
|
+
@driver.precondition
|
49
|
+
@driver.skeletoner
|
50
|
+
fill_html
|
51
|
+
@driver.log.info('Get it: http://localhost:4567/index.html 😍')
|
52
|
+
end
|
53
|
+
|
54
|
+
def fill_html
|
55
|
+
languages = ['ruby', 'java']
|
56
|
+
languages.each do |lang|
|
57
|
+
type = language_type(lang: lang)
|
58
|
+
@pageobject = File.read(Dir["#{Base::PAGE_OBJECTS_FOLDER}/*.#{type}"].first)
|
59
|
+
@elements_tree = File.read(Dir["#{Base::PAGE_OBJECTS_FOLDER}/*.xml"].first)
|
60
|
+
screenshot = Dir["#{Base::ATTACHMENTS_FOLDER}/*.png"].first
|
61
|
+
FileUtils.cp_r(screenshot, "../html/screenshot.png")
|
62
|
+
template = File.read('../html/template.html.erb')
|
63
|
+
result = ERB.new(template).result(binding)
|
64
|
+
File.open("../html/#{lang}.html", 'w+') { |f| f.write(result) }
|
65
|
+
end
|
66
|
+
end
|
49
67
|
|
50
68
|
def ios?
|
51
69
|
@platform == 'ios'
|
data/lib/skeleton/base.rb
CHANGED
data/lib/skeleton/ios.rb
CHANGED
@@ -106,8 +106,12 @@ class IOS < Base
|
|
106
106
|
@page_source.slice!(start_grep)
|
107
107
|
@page_source.slice!(end_grep)
|
108
108
|
if @page_source.empty?
|
109
|
-
log.fatal(
|
110
|
-
|
109
|
+
log.fatal(
|
110
|
+
"Something went wrong.\n" \
|
111
|
+
"1. Try to sign Skeleton in #{XCODEPROJ_FOLDER}\n" \
|
112
|
+
"2. Check in the iOS settings that Skeleton is trust developer.\n" \
|
113
|
+
'3. Check your app bundle_id'
|
114
|
+
)
|
111
115
|
raise
|
112
116
|
end
|
113
117
|
log.info('Successfully getting Screen Source Tree 🔥')
|
data/lib/skeleton/languages.rb
CHANGED
data/lib/skeleton/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skeleton-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- a.alterpesotskiy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -131,6 +131,12 @@ files:
|
|
131
131
|
- docs/real-ios-device-config.md
|
132
132
|
- docs/sign_xcproj.png
|
133
133
|
- docs/untrusted-dev.png
|
134
|
+
- html/index.css
|
135
|
+
- html/index.html
|
136
|
+
- html/java.html
|
137
|
+
- html/ruby.html
|
138
|
+
- html/server.rb
|
139
|
+
- html/template.html.erb
|
134
140
|
- lib/skeleton.rb
|
135
141
|
- lib/skeleton/android.rb
|
136
142
|
- lib/skeleton/base.rb
|