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.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/lib/applitools/capybara.rb +1 -1
  3. data/lib/applitools/selenium/border_aware_element_content_location_provider.rb +41 -0
  4. data/lib/applitools/selenium/browser.rb +1 -0
  5. data/lib/applitools/selenium/capybara/capybara_settings.rb +8 -0
  6. data/lib/applitools/selenium/capybara/driver.rb +1 -0
  7. data/lib/applitools/selenium/context_based_scale_provider.rb +36 -0
  8. data/lib/applitools/selenium/css_translate_position_provider.rb +66 -0
  9. data/lib/applitools/selenium/driver.rb +159 -44
  10. data/lib/applitools/selenium/element.rb +100 -8
  11. data/lib/applitools/selenium/element_position_provider.rb +48 -0
  12. data/lib/applitools/selenium/eyes.rb +922 -0
  13. data/lib/applitools/selenium/eyes_target_locator.rb +191 -0
  14. data/lib/applitools/selenium/eyes_web_driver_screenshot.rb +274 -0
  15. data/lib/applitools/selenium/frame.rb +24 -0
  16. data/lib/applitools/selenium/frame_chain.rb +68 -0
  17. data/lib/applitools/selenium/full_page_capture_algorithm.rb +162 -0
  18. data/lib/applitools/selenium/keyboard.rb +1 -0
  19. data/lib/applitools/selenium/match_window_task.rb +0 -197
  20. data/lib/applitools/selenium/mouse.rb +1 -0
  21. data/lib/applitools/selenium/move_to_region_visibility_strategy.rb +33 -0
  22. data/lib/applitools/selenium/nop_region_visibility_strategy.rb +16 -0
  23. data/lib/applitools/selenium/scroll_position_provider.rb +52 -0
  24. data/lib/applitools/selenium/takes_screenshot_image_provider.rb +36 -0
  25. data/lib/applitools/version.rb +1 -1
  26. data/lib/eyes_selenium.rb +19 -30
  27. metadata +24 -254
  28. data/.gitignore +0 -18
  29. data/.rspec +0 -2
  30. data/.rubocop.yml +0 -57
  31. data/.travis.yml +0 -17
  32. data/Gemfile +0 -4
  33. data/LICENSE.txt +0 -13
  34. data/README.md +0 -38
  35. data/Rakefile +0 -11
  36. data/certs/cacert.pem +0 -3557
  37. data/examples/appium_example_script.rb +0 -59
  38. data/examples/capybara_example.rb +0 -82
  39. data/examples/sauce_capybara_example.rb +0 -41
  40. data/examples/sauce_example.rb +0 -34
  41. data/examples/simple_test_script.rb +0 -23
  42. data/examples/watir_test_script.rb +0 -26
  43. data/eyes_selenium.gemspec +0 -89
  44. data/lib/applitools/appium_driver.rb +0 -7
  45. data/lib/applitools/base/batch_info.rb +0 -21
  46. data/lib/applitools/base/dimension.rb +0 -36
  47. data/lib/applitools/base/environment.rb +0 -19
  48. data/lib/applitools/base/image_position.rb +0 -10
  49. data/lib/applitools/base/mouse_trigger.rb +0 -33
  50. data/lib/applitools/base/point.rb +0 -34
  51. data/lib/applitools/base/region.rb +0 -112
  52. data/lib/applitools/base/server_connector.rb +0 -120
  53. data/lib/applitools/base/session.rb +0 -15
  54. data/lib/applitools/base/start_info.rb +0 -34
  55. data/lib/applitools/base/test_results.rb +0 -28
  56. data/lib/applitools/base/text_trigger.rb +0 -22
  57. data/lib/applitools/extensions.rb +0 -17
  58. data/lib/applitools/eyes.rb +0 -460
  59. data/lib/applitools/eyes_logger.rb +0 -38
  60. data/lib/applitools/method_tracer.rb +0 -22
  61. data/lib/applitools/poltergeist/applitools_compatible.rb +0 -28
  62. data/lib/applitools/poltergeist/driver.rb +0 -11
  63. data/lib/applitools/sauce.rb +0 -2
  64. data/lib/applitools/selenium/match_window_data.rb +0 -28
  65. data/lib/applitools/selenium_webdriver.rb +0 -8
  66. data/lib/applitools/utils/image_delta_compressor.rb +0 -148
  67. data/lib/applitools/utils/image_utils.rb +0 -143
  68. data/lib/applitools/utils/utils.rb +0 -49
  69. data/lib/applitools/watir_browser.rb +0 -8
  70. data/spec/driver_passthrough_spec.rb +0 -68
  71. data/spec/fixtures/static_test_file.html +0 -15
  72. 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