site_prism_plus 0.2.0 → 0.3.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 +5 -5
- data/lib/site_prism_plus/site_prism_plus_commons.rb +0 -2
- data/lib/site_prism_plus/version.rb +1 -1
- data/lib/site_prism_plus.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaf1a69c180761aa51e18b6e1a190aba59f2d0067612e8ef5787de22cf46cca6
|
4
|
+
data.tar.gz: be9b202fa06291ca71d18b5a1df642386f54d5923d6dfeacdeb9526f9155dc5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b76953dd83c8b6f2cea4b9f2dedca0c6807af3716c6fcaf34f6c51741b8219efc88263bd649fa9785e4cb6d6218dcc8b928fc60c5f8a285d7ea638e9444f40c0
|
7
|
+
data.tar.gz: d34ea79352d4536cb2caf493b67695dc588c5a286a33e5959f45b13cfb1d9e8d73c3ec135d6eb83fd8e519fd0b7367e94cfc6b1d14c25906df821236a752990e
|
data/README.md
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# SitePrismPlus
|
2
2
|
|
3
|
-
###THIS IS NOT PUBLISHED YET.
|
4
|
-
|
5
3
|
Extends the page object model [site_prism ruby gem](https://github.com/natritmeyer/site_prism). It adds common methods to make test execution robust. The gem also can log events such as click errors or page load times into a flat file.
|
6
4
|
|
7
5
|
Dynamic single page applications are getting difficult to test usually caused by timing issues resulting in raised
|
@@ -10,8 +8,6 @@ is a great POM framework so it's quite useful extend it and put your utils.
|
|
10
8
|
|
11
9
|
## Installation
|
12
10
|
|
13
|
-
###THIS IS NOT PUBLISHED YET.
|
14
|
-
|
15
11
|
Add this line to your application's Gemfile:
|
16
12
|
|
17
13
|
```ruby
|
@@ -45,7 +41,7 @@ Loads the page and verifies if the element expected is present. Method __load_an
|
|
45
41
|
as a parameter. The page is loaded and the element is checked until visible.
|
46
42
|
```ruby
|
47
43
|
demo_site = DemoSite.new('page_description')
|
48
|
-
demo_site.
|
44
|
+
demo_site.load_and_verify('header_logo')
|
49
45
|
```
|
50
46
|
|
51
47
|
#### Clicking an element
|
@@ -54,6 +50,10 @@ exceptions and does a retry. If a second element is passed as a parameter, it ve
|
|
54
50
|
to determine if the click action was successful.
|
55
51
|
```ruby
|
56
52
|
demo_site.click_element('sub_link', 'click_result_elem')
|
53
|
+
|
54
|
+
# or
|
55
|
+
|
56
|
+
demo_site.click_element('sub_link')
|
57
57
|
```
|
58
58
|
|
59
59
|
#### Send keys and verify
|
@@ -66,7 +66,6 @@ module SitePrismPlusCommons
|
|
66
66
|
nretry = 0
|
67
67
|
res = false
|
68
68
|
while nretry < max_retry && !res do
|
69
|
-
puts "CHECKING VISIBLE!!!!!!!!!!! #{element_name} result #{res}"
|
70
69
|
nretry += 1
|
71
70
|
res = is_element_visible?(element_name)
|
72
71
|
if !visible_test
|
@@ -74,7 +73,6 @@ module SitePrismPlusCommons
|
|
74
73
|
end
|
75
74
|
|
76
75
|
if !res
|
77
|
-
puts "WAITING VISIBILITY"
|
78
76
|
sleep(1)
|
79
77
|
end
|
80
78
|
end
|
data/lib/site_prism_plus.rb
CHANGED