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.
- checksums.yaml +4 -4
- data/bin/scoutui_driver +1 -0
- data/lib/scoutui/base/visual_test_framework.rb +41 -12
- data/lib/scoutui/commands/clauses/do_until.rb +4 -0
- data/lib/scoutui/commands/click_object.rb +3 -2
- data/lib/scoutui/version.rb +1 -1
- data/scoutui.gemspec +2 -1
- metadata +19 -26
- data/examples/benchmark/ex_benchmark.rb +0 -16
- data/examples/carmax/appmodel/main.nav.json +0 -48
- data/examples/carmax/tests/test-carmax.sh +0 -104
- data/examples/ci_reporter/ci_example.rb +0 -46
- data/examples/cmdshell/commands/cmd.yml +0 -92
- data/examples/cmdshell/commands/hello.sh +0 -5
- data/examples/converters/jsony.rb +0 -36
- data/examples/data_driven/data/queries.yml +0 -10
- data/examples/data_driven/data/requirements.yml +0 -8
- data/examples/db/sqlclient.rb +0 -39
- data/examples/enums/my_enum.rb +0 -30
- data/examples/ex6/appmodel/model.json +0 -10
- data/examples/ex6/tests/test.sh +0 -103
- data/examples/eyes/diff.rb +0 -114
- data/examples/eyes/ex1.spec.rb +0 -45
- data/examples/eyes/ex2.rb +0 -23
- data/examples/eyes_results/response.json +0 -372
- data/examples/screenshot/fullshot.rb +0 -66
- data/examples/shell/run_shell.rb +0 -45
- data/examples/shell/runit.sh +0 -4
- data/examples/yaml/dut.yml +0 -5
- data/examples/yaml/ex_yaml.rb +0 -18
@@ -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
|
data/examples/shell/run_shell.rb
DELETED
@@ -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}"
|
data/examples/shell/runit.sh
DELETED
data/examples/yaml/dut.yml
DELETED