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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58fdfb7b11f94ebd4ecd06d200a119f8241250bcc2f488b3bb94ae5f251546cf
4
- data.tar.gz: ff1c43e96ee2c1616c0ed15a3524bd37045000121da45be3eedb64d8ec479eb1
3
+ metadata.gz: 4e1802b19649d04e84ba84b0aef55e41bc1c6dfbc1cda67bf7a2fae23758daf7
4
+ data.tar.gz: 6018069091feaacdb6996c624d59c8a85a4ffb1890152d8efde21b03e4bef855
5
5
  SHA512:
6
- metadata.gz: 86db648a0fbf86aa9d05f1ee3470133aca0ff0fdc24399c406fd001376a0277345474203bb191a6606dc3836d44f84f33d257ddf81bbed3424a3baa5115a5233
7
- data.tar.gz: 3b9b9ada89869672854e9b1558238c0ccbb4a64ff077bfdef858fc9bda8dd7fc7a4d1b342733e894735427eaa2b4e21378d52b6580115cccef659384d4fd6e3f
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
- case index
27
- when 0
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)
@@ -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;')
@@ -33,7 +33,7 @@ module CMDLine
33
33
  '-b',
34
34
  '--browser browser',
35
35
  'Supported Browsers: chrome,' \
36
- ' chrome-headless, firefox, firefox-headless.'
36
+ ' chrome-headless, firefox, firefox-headless'
37
37
  ) do |b|
38
38
  options[:browser] = b
39
39
  $browserType = options[:browser]
@@ -3,7 +3,7 @@
3
3
  module Taf
4
4
  # This module holds the TAF version information.
5
5
  module Version
6
- STRING = '0.3.3'
6
+ STRING = '0.3.4'
7
7
 
8
8
  MSG = '%<version>s (using Parser %<parser_version>s, running on ' \
9
9
  '%<ruby_engine>s %<ruby_version>s %<ruby_platform>s)'
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.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 testweb automation -
167
+ description: Test Automation Framework (TAF) to allow simple test web automation -
168
168
  external use
169
169
  email:
170
170
  executables: