scoutui 2.0.3.56.pre → 2.0.3.57.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,66 +0,0 @@
1
- # needs the selenium-webdriver and mini_magick gems
2
- ]
3
- require 'eyes_selenium'
4
-
5
-
6
-
7
-
8
-
9
-
10
- # Substitute these with the size of your web page
11
- page_width = 1024
12
- page_height = 800
13
-
14
- height_captured = 0
15
- y_tiles = 0
16
-
17
- wd = Selenium::WebDriver.for :firefox # Connect to your Selenium Webdriver
18
-
19
- eyes=Applitools::Eyes.new()
20
- eyes.api_key = "Peter"
21
- eyes.force_fullpage_screenshot = true
22
-
23
- viewport = Selenium::WebDriver::Dimension.new(1024, 768)
24
-
25
- driver = eyes.open(
26
- app_name: 'Full',
27
- test_name: 'FullShot',
28
- viewport_size: viewport,
29
- driver: wd)
30
-
31
-
32
- asb = Applitools::Selenium::Browser.new(driver, eyes)
33
-
34
- driver.navigate.to "http://www.concursolutions.com"
35
- driver.manage.window.maximize
36
- shot=driver.get_screenshot
37
- puts __FILE__ + (__LINE__).to_s + " shot => #{shot.class}"
38
-
39
- if false
40
- while height_captured < page_height
41
- width_captured = 0
42
- x_tiles = 0
43
-
44
- while width_captured < page_width
45
- tile_file = "screenshot-#{y_tiles}-#{x_tiles}.png"
46
-
47
- driver.execute_script("window.scrollTo(#{width_captured}px, #{height_captured});")
48
-
49
- driver.save_screenshot tile_file
50
-
51
- screenshot = MiniMagick::Image.new tile_file
52
- width_captured += screenshot.width
53
- x_tiles += 1
54
- end
55
-
56
- height_captured += screenshot.height
57
- y_tiles += 1
58
- end
59
-
60
- # Use imagemagick's montage command to stitch the screenshot tiles together
61
- `montage screenshot-[0-#(y_tiles}]-[0-#{x_tiles}].png -tile #{x_tiles}x#{y_tiles} -geometry #{screenshot.width}x#{screenshot.height}+0+0 screenshot.png`
62
-
63
-
64
- end
65
-
66
- driver.quit
@@ -1,45 +0,0 @@
1
-
2
-
3
- class RunShell
4
-
5
- attr_accessor :cmd
6
- attr_accessor :results
7
- attr_accessor :exitStatus
8
-
9
- def initialize(_c=nil)
10
- @exitStatus=nil
11
- @cmd=_c
12
- end
13
-
14
-
15
- def execute(opts=nil)
16
- @results=nil
17
-
18
- if @cmd.match(/.*\.(sh|ksh|csh)\s*$/i)
19
- puts " execute script #{@cmd} #{opts.to_s}"
20
- @results = %x[ #{@cmd} #{opts.to_s} ]
21
- else
22
- @results = %x[ #{@cmd} #{opts.to_s} ]
23
- end
24
- @exitStatus = $?.exitstatus
25
-
26
- puts "results => #{@results}"
27
- puts "exist => #{@exitStatus}"
28
- end
29
-
30
- def results
31
- @results
32
- end
33
-
34
- end
35
-
36
-
37
-
38
-
39
- shell = RunShell.new("./runit.sh")
40
- shell.execute("Hello World")
41
-
42
- cmd2 = RunShell.new("ls -lta")
43
- cmd2.execute("/tmpxxx")
44
-
45
- puts "Results => #{cmd2.results}"
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- echo "Running from a shell"
4
-
@@ -1,5 +0,0 @@
1
- page:
2
- asserts:
3
- - one
4
- - two:
5
- foo: bar
@@ -1,18 +0,0 @@
1
- require 'yaml'
2
-
3
-
4
-
5
- y = YAML.load_stream File.read('./dut.yml')
6
-
7
-
8
- puts y
9
-
10
- i=0
11
- y.each do |e|
12
- puts "#{i}. #{e}"
13
-
14
- e['page']['asserts'].each do |a|
15
- puts "=> #{a}"
16
- end
17
- i+=1
18
- end