site_prism_plus 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +8 -7
- data/lib/site_prism_plus/site_prism_plus_commons.rb +3 -2
- data/lib/site_prism_plus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c953b6e51aa3c9fa5635a10d6a889e0f2115c96400fe342c2797b42375f8b977
|
4
|
+
data.tar.gz: eeed5d7d4b5b9da652da924e0005d1676663a0c8b9156c7f8d36c171777f2c9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f250506c8b8a97f055448595d6653d78728c8b00d8b85109850164599d9080aba4552eaa8b039f02c1cc1c038670db60ebcb8fbc58c85f8028405b4f6e56a4d2
|
7
|
+
data.tar.gz: c43852e1f56a6e2359702185c27964c4ded0f2c347f97d544f37f4ab283ac8a08ef33338fb0fcad6ed9e698f117640f9994c416dd13383eaa37789312d87ef95
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -63,22 +63,23 @@ demo_site.click_element('sub_link')
|
|
63
63
|
|
64
64
|
#### Send keys and verify
|
65
65
|
For input fields with auto-complete or has match recommendation, sending keys to the field sometimes results with several
|
66
|
-
issues. Method
|
66
|
+
issues. Method __send_text__ sends the text to an input field and verifies field has the correct text. If not
|
67
67
|
field is cleared and text is resent.
|
68
68
|
```ruby
|
69
|
-
demo_site.
|
69
|
+
demo_site.send_text('name_input_field', 'some_user_name')
|
70
70
|
```
|
71
71
|
|
72
72
|
#### Send chars
|
73
|
-
|
74
|
-
|
73
|
+
Checking auto-completion fields such as search or address fields looks at each character sent.
|
74
|
+
Method __send_chars__ sends text to an input field one character at a time with a slight delay between characters. Useful when checking for
|
75
|
+
matching results.
|
75
76
|
```ruby
|
76
77
|
demo_site.send_chars('search_input', 'cheap flights')
|
77
78
|
```
|
78
79
|
|
79
80
|
#### Checking Visibility
|
80
|
-
Returns
|
81
|
-
(ex. SitePrism::TimeOutWaitingForElementVisibility:).
|
81
|
+
Returns assertion if an element is found and is visible(true or false). Catches possible exceptions such as those
|
82
|
+
raised by site_prism (ex. SitePrism::TimeOutWaitingForElementVisibility:).
|
82
83
|
* is_element_visible('name_of_element')
|
83
84
|
* wait_till_element_visible('name_of_element')
|
84
85
|
* wait_till_element_not_visible('name_of_element')
|
@@ -87,7 +88,7 @@ demo_site.wait_till_element_visible('header_logo')
|
|
87
88
|
```
|
88
89
|
|
89
90
|
#### Hover and click
|
90
|
-
|
91
|
+
Used for hover activated drop downs. An optional third parameter (expected_element) can be passed. This element will
|
91
92
|
be verified to determine if the click was successful.
|
92
93
|
```ruby
|
93
94
|
demo_site.hover_and_click('hover_element', 'drop_option')
|
@@ -145,7 +145,7 @@ module SitePrismPlusCommons
|
|
145
145
|
return result
|
146
146
|
end
|
147
147
|
|
148
|
-
# Use when dealing with auto-complete fields
|
148
|
+
# Use when dealing with auto-complete fields such as search fields, address fields
|
149
149
|
# Sends text to an input field one character at a time with a slight
|
150
150
|
# delay between characters
|
151
151
|
def send_chars(element_name, txt_to_send)
|
@@ -196,8 +196,9 @@ module SitePrismPlusCommons
|
|
196
196
|
# Similar to send_chars, this method auto correct itself if the
|
197
197
|
# text is not the same as what was sent
|
198
198
|
# - happens with input fields not ready
|
199
|
+
# - pre-populated values
|
199
200
|
# - character send does not register especially with auto-complete fields
|
200
|
-
def
|
201
|
+
def send_text(element_name, txt_to_send)
|
201
202
|
nretry = 0
|
202
203
|
while nretry < 2
|
203
204
|
nretry += 1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site_prism_plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ibarra Alfonso
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: site_prism
|