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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be4abef064cc25eb50c8a5eb9a56882df5f06f29
4
- data.tar.gz: 91f8843e49995ddc89d1067074ae253f10aafc66
3
+ metadata.gz: 1b4fe8f6b3ddacabb9ee5feba5d3c203f08a26cb
4
+ data.tar.gz: 57cbf028c9088b41a80e8281aa943a084fbe66d6
5
5
  SHA512:
6
- metadata.gz: ba23f875bbab44dc04ed47d03342499ccf1c7ba7acded1b242a8313aea4ab67e84bfd3cd816e16c91b867d4eab10ecd76cbe1c719d21c24ddad11cd2d9e4c1e4
7
- data.tar.gz: fd42bd950f95de0bea1ee2b36070a784633ff262ef775975a785935a28a77b3b8a2fd887394d4e8c5b7198a09cbfbf190f10d51afec8533df6cb027b066e82fb
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.new.open_page("smthing.com") # Will navigate you to http://smthing.com
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.new
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.new
122
+ test_page = TestPage.open_page # Navigating you to http://smthing.com/testpath
124
123
  test_page.path #=> "testpath"
125
- test_page.open_page # Will navigate you to http://smthing.com/testpath
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.30366 only. And I am not a professional developer. But I am training her on new tricks.*
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"}}}}
@@ -2,8 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe "We will do some dummy things like" do
4
4
  before(:each) do
5
- @page = MyTestPage.new
6
- @page.open_page
5
+ @page = MyTestPage.open_page
7
6
  end
8
7
  it "touching every single element at the test page" do
9
8
  @page.form_fill
@@ -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.addEventListener("click", function(e) {marta_click_work(e)} , true);
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
- var toClear = document.querySelector("[martaclass=marta_smthing]");
249
- toClear.parentNode.removeChild(toClear);
248
+ marta_clean_up();
250
249
  marta_confirm_mark = true;
251
250
  marta_result = "1";
252
251
  }
@@ -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 : inherit;
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
  }
@@ -71,6 +71,7 @@ module Marta
71
71
  raise ArgumentError, "You should set url to use open_page. You may"\
72
72
  " also use base_url option for dance_with and path for page object"
73
73
  end
74
+ self
74
75
  end
75
76
 
76
77
  alias_method :default_method_missing, :method_missing
data/lib/marta/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Marta
2
- VERSION = "0.30366"
2
+ VERSION = "0.31813"
3
3
  NAME = "marta"
4
4
  end
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.30366'
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-08-22 00:00:00.000000000 Z
11
+ date: 2017-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler