eyes_selenium 2.39.1 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applitools/capybara.rb +1 -1
- data/lib/applitools/selenium/border_aware_element_content_location_provider.rb +41 -0
- data/lib/applitools/selenium/browser.rb +1 -0
- data/lib/applitools/selenium/capybara/capybara_settings.rb +8 -0
- data/lib/applitools/selenium/capybara/driver.rb +1 -0
- data/lib/applitools/selenium/context_based_scale_provider.rb +36 -0
- data/lib/applitools/selenium/css_translate_position_provider.rb +66 -0
- data/lib/applitools/selenium/driver.rb +159 -44
- data/lib/applitools/selenium/element.rb +100 -8
- data/lib/applitools/selenium/element_position_provider.rb +48 -0
- data/lib/applitools/selenium/eyes.rb +922 -0
- data/lib/applitools/selenium/eyes_target_locator.rb +191 -0
- data/lib/applitools/selenium/eyes_web_driver_screenshot.rb +274 -0
- data/lib/applitools/selenium/frame.rb +24 -0
- data/lib/applitools/selenium/frame_chain.rb +68 -0
- data/lib/applitools/selenium/full_page_capture_algorithm.rb +162 -0
- data/lib/applitools/selenium/keyboard.rb +1 -0
- data/lib/applitools/selenium/match_window_task.rb +0 -197
- data/lib/applitools/selenium/mouse.rb +1 -0
- data/lib/applitools/selenium/move_to_region_visibility_strategy.rb +33 -0
- data/lib/applitools/selenium/nop_region_visibility_strategy.rb +16 -0
- data/lib/applitools/selenium/scroll_position_provider.rb +52 -0
- data/lib/applitools/selenium/takes_screenshot_image_provider.rb +36 -0
- data/lib/applitools/version.rb +1 -1
- data/lib/eyes_selenium.rb +19 -30
- metadata +24 -254
- data/.gitignore +0 -18
- data/.rspec +0 -2
- data/.rubocop.yml +0 -57
- data/.travis.yml +0 -17
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -13
- data/README.md +0 -38
- data/Rakefile +0 -11
- data/certs/cacert.pem +0 -3557
- data/examples/appium_example_script.rb +0 -59
- data/examples/capybara_example.rb +0 -82
- data/examples/sauce_capybara_example.rb +0 -41
- data/examples/sauce_example.rb +0 -34
- data/examples/simple_test_script.rb +0 -23
- data/examples/watir_test_script.rb +0 -26
- data/eyes_selenium.gemspec +0 -89
- data/lib/applitools/appium_driver.rb +0 -7
- data/lib/applitools/base/batch_info.rb +0 -21
- data/lib/applitools/base/dimension.rb +0 -36
- data/lib/applitools/base/environment.rb +0 -19
- data/lib/applitools/base/image_position.rb +0 -10
- data/lib/applitools/base/mouse_trigger.rb +0 -33
- data/lib/applitools/base/point.rb +0 -34
- data/lib/applitools/base/region.rb +0 -112
- data/lib/applitools/base/server_connector.rb +0 -120
- data/lib/applitools/base/session.rb +0 -15
- data/lib/applitools/base/start_info.rb +0 -34
- data/lib/applitools/base/test_results.rb +0 -28
- data/lib/applitools/base/text_trigger.rb +0 -22
- data/lib/applitools/extensions.rb +0 -17
- data/lib/applitools/eyes.rb +0 -460
- data/lib/applitools/eyes_logger.rb +0 -38
- data/lib/applitools/method_tracer.rb +0 -22
- data/lib/applitools/poltergeist/applitools_compatible.rb +0 -28
- data/lib/applitools/poltergeist/driver.rb +0 -11
- data/lib/applitools/sauce.rb +0 -2
- data/lib/applitools/selenium/match_window_data.rb +0 -28
- data/lib/applitools/selenium_webdriver.rb +0 -8
- data/lib/applitools/utils/image_delta_compressor.rb +0 -148
- data/lib/applitools/utils/image_utils.rb +0 -143
- data/lib/applitools/utils/utils.rb +0 -49
- data/lib/applitools/watir_browser.rb +0 -8
- data/spec/driver_passthrough_spec.rb +0 -68
- data/spec/fixtures/static_test_file.html +0 -15
- data/spec/spec_helper.rb +0 -17
@@ -1,8 +0,0 @@
|
|
1
|
-
if defined? Watir::Browser
|
2
|
-
Watir::Browser.class_eval do
|
3
|
-
def driver_for_eyes(eyes)
|
4
|
-
is_mobile_device = driver.capabilities['platformName'] ? true : false
|
5
|
-
Applitools::Selenium::Driver.new(eyes, driver: driver, is_mobile_device: is_mobile_device)
|
6
|
-
end
|
7
|
-
end
|
8
|
-
end
|
@@ -1,68 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe 'passthrough methods' do
|
4
|
-
let(:static_file) { "file://#{File.dirname(__FILE__)}/fixtures/static_test_file.html" }
|
5
|
-
let(:eyes) { Applitools::Eyes.new }
|
6
|
-
let(:web_driver) { Selenium::WebDriver.for :phantomjs }
|
7
|
-
|
8
|
-
before do |example|
|
9
|
-
eyes.api_key = 'dummy_key'
|
10
|
-
|
11
|
-
@driver = eyes.open(app_name: 'Specs', test_name: example.metadata[:full_description],
|
12
|
-
viewport_size: { width: 800, height: 600 }, driver: web_driver)
|
13
|
-
@driver.get static_file
|
14
|
-
end
|
15
|
-
|
16
|
-
after do
|
17
|
-
eyes.close
|
18
|
-
|
19
|
-
@driver.quit
|
20
|
-
end
|
21
|
-
|
22
|
-
it 'current_url' do
|
23
|
-
url = @driver.current_url
|
24
|
-
expect(url).to eq(static_file)
|
25
|
-
end
|
26
|
-
|
27
|
-
describe 'find_element(s)' do
|
28
|
-
context 'single element' do
|
29
|
-
it 'explicit' do
|
30
|
-
link = @driver.find_element(:css, 'a')
|
31
|
-
expect(link).not_to be_nil
|
32
|
-
expect(link).to be_a(Applitools::Selenium::Element)
|
33
|
-
end
|
34
|
-
|
35
|
-
it 'by hash' do
|
36
|
-
link = @driver.find_element(css: 'a')
|
37
|
-
expect(link).not_to be_nil
|
38
|
-
expect(link).to be_a(Applitools::Selenium::Element)
|
39
|
-
end
|
40
|
-
|
41
|
-
# From the Selenium tests
|
42
|
-
# @see https://github.com/SeleniumHQ/selenium/blob/7e2cca5/rb/spec/integration/selenium/webdriver/element_spec.rb#L192
|
43
|
-
it 'should know when two elements are equal' do
|
44
|
-
body = @driver.find_element(tag_name: 'body')
|
45
|
-
xbody = @driver.find_element(xpath: '//body')
|
46
|
-
|
47
|
-
expect(body).to eq(xbody)
|
48
|
-
expect(body).to eql(xbody)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
context 'all elements' do
|
53
|
-
it 'explicit' do
|
54
|
-
collection = @driver.find_elements(css: 'a')
|
55
|
-
expect(collection).not_to be_nil
|
56
|
-
expect(collection[0]).to be_a(Applitools::Selenium::Element)
|
57
|
-
expect(collection[1]).to be_a(Applitools::Selenium::Element)
|
58
|
-
end
|
59
|
-
|
60
|
-
it 'by hash' do
|
61
|
-
collection = @driver.find_elements(css: 'a')
|
62
|
-
expect(collection).not_to be_nil
|
63
|
-
expect(collection[0]).to be_a(Applitools::Selenium::Element)
|
64
|
-
expect(collection[1]).to be_a(Applitools::Selenium::Element)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<body>
|
3
|
-
|
4
|
-
<a href="#">first link</a>
|
5
|
-
<a href="#">second link</a>
|
6
|
-
<a href="#">third link</a>
|
7
|
-
|
8
|
-
<form id="login">
|
9
|
-
<input name="username" type="text"/>
|
10
|
-
<input name="password" type="password"/>
|
11
|
-
<input name="submit" type="submit" value="Continue!"/>
|
12
|
-
</form>
|
13
|
-
|
14
|
-
</body>
|
15
|
-
</html>
|
data/spec/spec_helper.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'eyes_selenium'
|
2
|
-
|
3
|
-
RSpec.configure do |config|
|
4
|
-
config.before do
|
5
|
-
allow_any_instance_of(Applitools::Base::ServerConnector).to receive(:start_session) do
|
6
|
-
Applitools::Base::Session.new('dummy_id', 'dummy_url', true)
|
7
|
-
end
|
8
|
-
|
9
|
-
allow_any_instance_of(Applitools::Base::ServerConnector).to receive(:stop_session) do
|
10
|
-
Applitools::Base::TestResults.new
|
11
|
-
end
|
12
|
-
|
13
|
-
allow_any_instance_of(Applitools::Base::ServerConnector).to receive(:match_window) do
|
14
|
-
true
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|