marta 0.30366 → 0.31813
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 +7 -7
- data/example_project/spec/p_object/pageobjects/MartaTestPage.json +1 -1
- data/example_project/spec/watir_test_page_spec.rb +1 -2
- data/lib/marta/data/element.js +3 -4
- data/lib/marta/data/style.css +10 -6
- data/lib/marta/public_methods.rb +1 -0
- data/lib/marta/version.rb +1 -1
- data/lib/marta.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1b4fe8f6b3ddacabb9ee5feba5d3c203f08a26cb
|
|
4
|
+
data.tar.gz: 57cbf028c9088b41a80e8281aa943a084fbe66d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2b37b9b074afe23940c0949028c1a65eee3931fbaed832c4fca5c8de9e42da36dcf3f5516673a8908d5eb21ad15bc374de969c040f13e1e7483bb7a118d7b75
|
|
7
|
+
data.tar.gz: e003e723ea5d48d563b05b0e2d88d2fade5d2ccdd7de78caf2fe974f7622e91c088a4885e10239f69107108b1e618c4f1d8420a5831f7451acfc1b936fdeb942
|
data/README.md
CHANGED
|
@@ -99,10 +99,10 @@ your_page.method_edit('newelementname')
|
|
|
99
99
|
|
|
100
100
|
*A: That method is a part of the SmartPage class. It means that you can call it for any class\page object which was generated by Marta. There are three ways to use it:*
|
|
101
101
|
|
|
102
|
-
*The most straight way
|
|
102
|
+
*The most straight way:*
|
|
103
103
|
```ruby
|
|
104
104
|
dance_with
|
|
105
|
-
TestPage.
|
|
105
|
+
TestPage.open_page("smthing.com") # Will navigate you to http://smthing.com
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
*Predefined url way:*
|
|
@@ -110,9 +110,8 @@ TestPage.new.open_page("smthing.com") # Will navigate you to http://smthing.com
|
|
|
110
110
|
*At the step of the page defining set variable url = smthing.com*
|
|
111
111
|
```ruby
|
|
112
112
|
dance_with
|
|
113
|
-
test_page = TestPage.
|
|
113
|
+
test_page = TestPage.open_page # Will navigate you to http://smthing.com
|
|
114
114
|
test_page.url #=> "smthing.com"
|
|
115
|
-
test_page.open_page # Will navigate you to http://smthing.com
|
|
116
115
|
```
|
|
117
116
|
|
|
118
117
|
*The most flexible way:*
|
|
@@ -120,9 +119,10 @@ test_page.open_page # Will navigate you to http://smthing.com
|
|
|
120
119
|
*At the step of the page defining you set path = testpath*
|
|
121
120
|
```ruby
|
|
122
121
|
dance_with base_url: "smthing.com"
|
|
123
|
-
test_page = TestPage.
|
|
122
|
+
test_page = TestPage.open_page # Navigating you to http://smthing.com/testpath
|
|
124
123
|
test_page.path #=> "testpath"
|
|
125
|
-
|
|
124
|
+
# You can open page once again using already created instance
|
|
125
|
+
test_page.open_page # Will navigate you to http://smthing.com/testpath too
|
|
126
126
|
```
|
|
127
127
|
*Note: If there is no path provided than Marta will go to base_url. Also if url value is defined for page Marta will use it instead the base_url. If url is given as argument for the open_page method Marta will ignore both url and base_url values and will use the argument provided.*
|
|
128
128
|
|
|
@@ -240,7 +240,7 @@ g_page.search "I am in love with selenium."
|
|
|
240
240
|
|
|
241
241
|
**Q: What else?**
|
|
242
242
|
|
|
243
|
-
*A: Nothing. Marta is under development. Her version is 0.
|
|
243
|
+
*A: Nothing. Marta is under development. Her version is 0.31813 only. And I am not a professional developer. But I am training her on new tricks.*
|
|
244
244
|
|
|
245
245
|
## Internal Design
|
|
246
246
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"vars":{"happy":"1","i1":"1","i2":"2","lang":"Java","url":"http://bit.ly/watir-example"},"meths":{"name_field":{"granny":{"class":["ss-item","ss-item-required","ss-text"],"dir":"auto"},"options":{"collection":false,"granny":"DIV","pappy":"DIV","self":"INPUT"},"pappy":{"class":["ss-form-entry"]},"self":{"aria-label":"What is your name? A text field ","aria-required":"true","class":["ss-q-short"],"dir":"auto","id":"entry_1000000","name":"entry.1000000","type":"text"}},"story_area":{"granny":{"class":["ss-item","","ss-paragraph-text"],"dir":"auto"},"options":{"collection":false,"granny":"DIV","pappy":"DIV","self":"TEXTAREA"},"pappy":{"class":["ss-form-entry"]},"self":{"aria-label":"What is your story? A text box ","class":["ss-q-long"],"cols":"0","dir":"auto","id":"entry_1000001","name":"entry.1000001","rows":"8"}},"watir":{"granny":{},"options":{"collection":false,"granny":"LABEL","pappy":"SPAN","self":"INPUT"},"pappy":{"class":["ss-choice-item-control","goog-inline-block"]},"self":{"aria-label":"Watir","class":["ss-q-radio"],"id":"group_1000002_1","name":"entry.1000002","role":"radio","type":"radio","value":"Watir"}},"language_checkbox":{"granny":{},"options":{"collection":false,"granny":"LABEL","pappy":"SPAN","self":"INPUT"},"pappy":{"class":["ss-choice-item-control","goog-inline-block"]},"self":{"class":["ss-q-checkbox"],"id":"group_1000003_1","name":"entry.1000003","role":"checkbox","type":"checkbox","value":"#{@lang}"}},"dropbox":{"granny":{"class":["ss-item","ss-select"],"dir":"auto"},"options":{"collection":false,"granny":"DIV","pappy":"DIV","self":"SELECT"},"pappy":{"class":["ss-form-entry"]},"self":{"aria-label":"What browser do you use? Drop down box ","class":[],"id":"entry_1000004","name":"entry.1000004"}},"how_happy_element":{"granny":{"class":["ss-scalerow"]},"options":{"collection":false,"granny":"TD","pappy":"DIV","self":"INPUT"},"pappy":{"class":["ss-scalerow-fieldcell"]},"self":{"aria-label":"#{@happy}","class":["ss-q-radio"],"id":"group_1000005_1","name":"entry.1000005","role":"radio","type":"radio","value":"#{@happy}"}},"item1_element":{"granny":{"class":["ss-grid-button-label"]},"options":{"collection":false,"granny":"LABEL","pappy":"DIV","self":"INPUT"},"pappy":{"class":["ss-grid-button-wrapper","ss-grid-cell"]},"self":{"aria-label":"#{@i1}","class":["ss-q-radio"],"id":"group_1000006_#{@i1}","name":"entry.1000006","role":"radio","type":"radio","value":"#{@i1}"}},"item2_element":{"granny":{"class":["ss-grid-button-label"]},"options":{"collection":false,"granny":"LABEL","pappy":"DIV","self":"INPUT"},"pappy":{"class":["ss-grid-button-wrapper","ss-grid-cell"]},"self":{"aria-label":"#{@i2}","class":["ss-q-radio"],"id":"group_1000007_#{@i2}","name":"entry.1000007","role":"radio","type":"radio","value":"#{@i2}"}},"send_button":{"granny":{},"options":{"collection":false,"granny":"TR","pappy":"TD","self":"INPUT"},"pappy":{"class":["ss-form-entry","goog-inline-block"],"dir":"ltr","id":"navigation-buttons"},"self":{"class":["jfk-button","jfk-button-action"],"id":"ss-submit","name":"submit","type":"submit"}},"confirmation_message":{"granny":{"class":["ss-container"]},"options":{"collection":false,"granny":"DIV","pappy":"DIV","self":"H1"},"pappy":{"class":["ss-resp-card"]},"self":{"class":["ss-confirmation"],"retrieved_by_marta_text":"Watir Example"}}}}
|
|
1
|
+
{"vars":{"happy":"1","i1":"1","i2":"2","lang":"Java","url":"http://bit.ly/watir-example"},"meths":{"name_field":{"granny":{"class":["ss-item","ss-item-required","ss-text"],"dir":"auto"},"options":{"collection":false,"granny":"DIV","pappy":"DIV","self":"INPUT"},"pappy":{"class":["ss-form-entry"]},"self":{"aria-label":"What is your name? A text field ","aria-required":"true","class":["ss-q-short"],"dir":"auto","id":"entry_1000000","name":"entry.1000000","required":"","title":"","type":"text","value":""}},"story_area":{"granny":{"class":["ss-item","","ss-paragraph-text"],"dir":"auto"},"options":{"collection":false,"granny":"DIV","pappy":"DIV","self":"TEXTAREA"},"pappy":{"class":["ss-form-entry"]},"self":{"aria-label":"What is your story? A text box ","class":["ss-q-long","valid"],"cols":"0","dir":"auto","id":"entry_1000001","name":"entry.1000001","rows":"8"}},"watir":{"granny":{},"options":{"collection":false,"granny":"LABEL","pappy":"SPAN","self":"INPUT"},"pappy":{"class":["ss-choice-item-control","goog-inline-block"]},"self":{"aria-label":"Watir","class":["ss-q-radio"],"id":"group_1000002_1","name":"entry.1000002","role":"radio","type":"radio","value":"Watir"}},"language_checkbox":{"granny":{},"options":{"collection":false,"granny":"LABEL","pappy":"SPAN","self":"INPUT"},"pappy":{"class":["ss-choice-item-control","goog-inline-block"]},"self":{"class":["ss-q-checkbox"],"id":"group_1000003_1","name":"entry.1000003","role":"checkbox","type":"checkbox","value":"#{@lang}"}},"dropbox":{"granny":{"class":["ss-item","ss-select"],"dir":"auto"},"options":{"collection":false,"granny":"DIV","pappy":"DIV","self":"SELECT"},"pappy":{"class":["ss-form-entry"]},"self":{"aria-label":"What browser do you use? Drop down box ","class":[],"id":"entry_1000004","name":"entry.1000004"}},"how_happy_element":{"granny":{"class":["ss-scalerow"]},"options":{"collection":false,"granny":"TD","pappy":"DIV","self":"INPUT"},"pappy":{"class":["ss-scalerow-fieldcell"]},"self":{"aria-label":"#{@happy}","class":["ss-q-radio"],"id":"group_1000005_1","name":"entry.1000005","role":"radio","type":"radio","value":"#{@happy}"}},"item1_element":{"granny":{"class":["ss-grid-button-label"]},"options":{"collection":false,"granny":"LABEL","pappy":"DIV","self":"INPUT"},"pappy":{"class":["ss-grid-button-wrapper","ss-grid-cell"]},"self":{"aria-label":"#{@i1}","class":["ss-q-radio"],"id":"group_1000006_#{@i1}","name":"entry.1000006","role":"radio","type":"radio","value":"#{@i1}"}},"item2_element":{"granny":{"class":["ss-grid-button-label"]},"options":{"collection":false,"granny":"LABEL","pappy":"DIV","self":"INPUT"},"pappy":{"class":["ss-grid-button-wrapper","ss-grid-cell"]},"self":{"aria-label":"#{@i2}","class":["ss-q-radio"],"id":"group_1000007_#{@i2}","name":"entry.1000007","role":"radio","type":"radio","value":"#{@i2}"}},"send_button":{"granny":{},"options":{"collection":false,"granny":"TR","pappy":"TD","self":"INPUT"},"pappy":{"class":["ss-form-entry","goog-inline-block"],"dir":"ltr","id":"navigation-buttons"},"self":{"class":["jfk-button","jfk-button-action"],"id":"ss-submit","name":"submit","type":"submit"}},"confirmation_message":{"granny":{"class":["ss-container"]},"options":{"collection":false,"granny":"DIV","pappy":"DIV","self":"H1"},"pappy":{"class":["ss-resp-card"]},"self":{"class":["ss-confirmation"],"retrieved_by_marta_text":"Watir Example"}}}}
|
data/lib/marta/data/element.js
CHANGED
|
@@ -177,7 +177,7 @@ function marta_click_work(e, iframe=false) {
|
|
|
177
177
|
if (!!target.parentElement){
|
|
178
178
|
marta_after_click(target.parentElement,"pappy");
|
|
179
179
|
};
|
|
180
|
-
if (!!target.parentElement){
|
|
180
|
+
if (!!target.parentElement.parentElement){
|
|
181
181
|
marta_after_click(target.parentElement.parentElement,"granny");
|
|
182
182
|
};
|
|
183
183
|
if(!marta_confirm_mark){
|
|
@@ -188,7 +188,7 @@ function marta_click_work(e, iframe=false) {
|
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
190
|
|
|
191
|
-
document.
|
|
191
|
+
document.onclick = function(e) {marta_click_work(e)};
|
|
192
192
|
|
|
193
193
|
function marta_after_click(el, what) {
|
|
194
194
|
marta_result[what] = {};
|
|
@@ -245,8 +245,7 @@ function marta_set_by_hand(){
|
|
|
245
245
|
|
|
246
246
|
function marta_end_loop(){
|
|
247
247
|
if (marta_room != 0){
|
|
248
|
-
|
|
249
|
-
toClear.parentNode.removeChild(toClear);
|
|
248
|
+
marta_clean_up();
|
|
250
249
|
marta_confirm_mark = true;
|
|
251
250
|
marta_result = "1";
|
|
252
251
|
}
|
data/lib/marta/data/style.css
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
@keyframes marta_found {
|
|
2
2
|
0% {border: 4px dashed #6495ED;}
|
|
3
|
-
20% {border: 4px dashed #FF7F50}
|
|
4
|
-
40% {border: 4px dashed #8FBC8F;}
|
|
5
|
-
60% {border: 4px dashed #FFA500}
|
|
6
|
-
80% {border: 4px dashed #DDA0DD}
|
|
7
|
-
100% {border: 4px dashed #6495ED;}
|
|
3
|
+
20% {border: 4px dashed #FF7F50; transform: scale(1.1);}
|
|
4
|
+
40% {border: 4px dashed #8FBC8F; transform: scale(1.2);}
|
|
5
|
+
60% {border: 4px dashed #FFA500; transform: scale(1.3);}
|
|
6
|
+
80% {border: 4px dashed #DDA0DD; transform: scale(1.2);}
|
|
7
|
+
100% {border: 4px dashed #6495ED; transform: scale(1.1);}
|
|
8
|
+
}
|
|
8
9
|
|
|
9
10
|
div[martaclass=marta_div] * {
|
|
10
11
|
animation : none;
|
|
@@ -62,7 +63,7 @@ div[martaclass=marta_div] * {
|
|
|
62
63
|
caption-side : top;
|
|
63
64
|
clear : none;
|
|
64
65
|
clip : auto;
|
|
65
|
-
color :
|
|
66
|
+
color : black;
|
|
66
67
|
columns : auto;
|
|
67
68
|
column-count : auto;
|
|
68
69
|
column-fill : balance;
|
|
@@ -324,4 +325,7 @@ input[martaclass=marta_smthing][type=checkbox]:checked {
|
|
|
324
325
|
|
|
325
326
|
[martaclass=foundbymarta]
|
|
326
327
|
{animation: marta_found 6s infinite;
|
|
328
|
+
-webkit-appearance: none;
|
|
329
|
+
-moz-appearance: none;
|
|
330
|
+
appearance: none;
|
|
327
331
|
}
|
data/lib/marta/public_methods.rb
CHANGED
data/lib/marta/version.rb
CHANGED
data/lib/marta.rb
CHANGED
|
@@ -31,6 +31,12 @@ module Marta
|
|
|
31
31
|
include BlackMagic, XPath, SimpleElementFinder, ClassesCreation,
|
|
32
32
|
PublicMethods, Dialogs, Injector, Lightning, OptionsAndPaths,
|
|
33
33
|
Json2Class, ReadWrite, UserValuePrework
|
|
34
|
+
|
|
35
|
+
# open_page can create new instance
|
|
36
|
+
def self.open_page(*args)
|
|
37
|
+
page = self.new
|
|
38
|
+
page.open_page(*args)
|
|
39
|
+
end
|
|
34
40
|
end
|
|
35
41
|
|
|
36
42
|
# That is how Marta connected to the world
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: marta
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.31813'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergei Seleznev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-09-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|