taf 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/functions/handlers/click_button.rb +2 -22
- data/lib/functions/handlers/write_box_data.rb +4 -0
- data/lib/utils/browser.rb +0 -18
- data/lib/utils/cmd_line.rb +1 -1
- data/lib/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: 4e1802b19649d04e84ba84b0aef55e41bc1c6dfbc1cda67bf7a2fae23758daf7
|
4
|
+
data.tar.gz: 6018069091feaacdb6996c624d59c8a85a4ffb1890152d8efde21b03e4bef855
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c28dda422345288442f9b428fc4680b8c8ac70aa328706493f5bb7b54ba93d728b5f2a0ce694872edaa0c52376d1ec6c473c071891734f04c023e652a274b3eb
|
7
|
+
data.tar.gz: 67f9b1a4371bc0eb5252bcfc0ef439c1251891f18515e405a088c4eda1fe4856ad3a73022af1f83318d7c309a6e5337f63c9ffbdd8132d6ce208be4c2208fd37
|
@@ -23,28 +23,8 @@ module TestSteps
|
|
23
23
|
index = found_button.index(true)
|
24
24
|
return unless index
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
Browser.b.button("#{locate}": button).wait_until(&:exists?).click
|
29
|
-
when 1
|
30
|
-
Browser.b.span("#{locate}": button).wait_until(&:exists?).click
|
31
|
-
when 2
|
32
|
-
Browser.b.a("#{locate}": button).wait_until(&:exists?).click
|
33
|
-
when 3
|
34
|
-
Browser.b.div("#{locate}": button).wait_until(&:exists?).click
|
35
|
-
when 4
|
36
|
-
Browser.b.link("#{locate}": button).wait_until(&:exists?).click
|
37
|
-
when 5
|
38
|
-
Browser.b.image("#{locate}": button).wait_until(&:exists?).click
|
39
|
-
when 6
|
40
|
-
Browser.b.h1("#{locate}": button).wait_until(&:exists?).click
|
41
|
-
when 7
|
42
|
-
Browser.b.h2("#{locate}": button).wait_until(&:exists?).click
|
43
|
-
when 8
|
44
|
-
Browser.b.h3("#{locate}": button).wait_until(&:exists?).click
|
45
|
-
when 9
|
46
|
-
Browser.b.h4("#{locate}": button).wait_until(&:exists?).click
|
47
|
-
end
|
26
|
+
Browser.b.send(elms[index], "#{locate}": button)
|
27
|
+
.wait_until(&:exists?).click
|
48
28
|
MyLog.log.info("Button: #{button} has been selected")
|
49
29
|
true
|
50
30
|
rescue StandardError
|
@@ -29,6 +29,10 @@ module TestSteps
|
|
29
29
|
index = found_box.index(true)
|
30
30
|
return unless index
|
31
31
|
|
32
|
+
WriteBoxdata.write_to_box_data(index, box, txt, locate)
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.write_to_box_data(index, box, txt, locate)
|
32
36
|
if index.zero?
|
33
37
|
Browser.b.textarea("#{locate}": box).wait_until(&:exists?).set txt
|
34
38
|
(Browser.b.textarea("#{locate}": box).text == txt)
|
data/lib/utils/browser.rb
CHANGED
@@ -21,10 +21,6 @@ module Browser
|
|
21
21
|
firefox
|
22
22
|
when 'firefox-headless'
|
23
23
|
firefox_headless
|
24
|
-
when 'ie'
|
25
|
-
ie
|
26
|
-
when 'safari'
|
27
|
-
safari
|
28
24
|
else
|
29
25
|
MyLog.log.error "unable to open selected browser: #{lc_browser_type}"
|
30
26
|
raise BrowserFailedOpen
|
@@ -79,20 +75,6 @@ module Browser
|
|
79
75
|
# browser
|
80
76
|
end
|
81
77
|
|
82
|
-
# ie browser details
|
83
|
-
def self.ie
|
84
|
-
@browser = Watir::Browser.new :ie
|
85
|
-
browser_full_screen
|
86
|
-
browser_version
|
87
|
-
end
|
88
|
-
|
89
|
-
# sarfari headless browser details
|
90
|
-
def self.safari
|
91
|
-
@browser = Watir::Browser.new :safari
|
92
|
-
browser_full_screen
|
93
|
-
browser_version
|
94
|
-
end
|
95
|
-
|
96
78
|
# makes the browser full screen.
|
97
79
|
def self.browser_full_screen
|
98
80
|
screen_width = @browser.execute_script('return screen.width;')
|
data/lib/utils/cmd_line.rb
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Perrett
|
@@ -164,7 +164,7 @@ dependencies:
|
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '6.16'
|
167
|
-
description: Test Automation Framework (TAF) to allow simple
|
167
|
+
description: Test Automation Framework (TAF) to allow simple test web automation -
|
168
168
|
external use
|
169
169
|
email:
|
170
170
|
executables:
|