# Path: applitools/geometry.py

# 
# Path: applitools/common.py

# 
# Path: applitools/target.py



import pytest
from selenium.webdriver.common.by import By
from applitools.geometry import Region
from applitools.common import StitchMode
from applitools.target import Target, IgnoreRegionBySelector, FloatingRegion, FloatingBounds
@pytest.mark.platform('Linux')
@pytest.mark.eyes(force_full_page_screenshot=True)
def test_check_window_with_ignore_region_fluent(eyes, driver):
    eyes.open(driver, "Eyes Selenium SDK - Fluent API", "TestCheckWindowWithIgnoreRegion_Fluent",
              {'width': 800, 'height': 600})
    driver.get('http://applitools.github.io/demo/TestPages/FramesTestPage/')
    driver.find_element_by_tag_name('input').send_keys('My Input')
    eyes.check_window("Fluent - Window with Ignore region", target=Target().ignore(
        Region(left=50, top=50, width=100, height=100)))
    eyes.close()


@pytest.mark.platform('Linux')
@pytest.mark.eyes(hide_scrollbars=True)
def test_check_window_with_send_dom(eyes, driver):
    eyes.open(driver, "Eyes Selenium SDK - Fluent API", "TestCheckWindowWithSendDom",
              {'width': 800, 'height': 600})
    driver.get('http://applitools.github.io/demo/TestPages/FramesTestPage/')
    driver.find_element_by_tag_name('input').send_keys('My Input')
    eyes.check_window("Fluent - Window with Ignore region", target=Target().send_dom().use_dom())
    assert 'data-applitools-scroll' in driver.page_source
    assert 'data-applitools-original-overflow' in driver.page_source
    eyes.close()


def test_check_element_with_original_driver(eyes, driver):
    eyes.open(driver, "Eyes Selenium SDK",
              "TestCheckElementWithOriginalDriver",
              {'width': 800, 'height': 600})
    driver.get('http://applitools.github.io/demo/TestPages/FramesTestPage/')

# Path: applitools/geometry.py

# 
# Path: applitools/common.py

# 
# Path: applitools/target.py



# Path: tests/selenium/test_specific_cases.py
import pytest
from selenium.webdriver.common.by import By
from applitools.geometry import Region
from applitools.common import StitchMode
from applitools.target import Target, IgnoreRegionBySelector, FloatingRegion, FloatingBounds

@pytest.mark.platform('Linux')
@pytest.mark.eyes(force_full_page_screenshot=True)
def test_check_window_with_ignore_region_fluent(eyes, driver):
    eyes.open(driver, "Eyes Selenium SDK - Fluent API", "TestCheckWindowWithIgnoreRegion_Fluent",
              {'width': 800, 'height': 600})
    driver.get('http://applitools.github.io/demo/TestPages/FramesTestPage/')
    driver.find_element_by_tag_name('input').send_keys('My Input')
    eyes.check_window("Fluent - Window with Ignore region", target=Target().ignore(
        Region(left=50, top=50, width=100, height=100)))
    eyes.close()


@pytest.mark.platform('Linux')
@pytest.mark.eyes(hide_scrollbars=True)
def test_check_window_with_send_dom(eyes, driver):
    eyes.open(driver, "Eyes Selenium SDK - Fluent API", "TestCheckWindowWithSendDom",
              {'width': 800, 'height': 600})
    driver.get('http://applitools.github.io/demo/TestPages/FramesTestPage/')
    driver.find_element_by_tag_name('input').send_keys('My Input')
    eyes.check_window("Fluent - Window with Ignore region", target=Target().send_dom().use_dom())
    assert 'data-applitools-scroll' in driver.page_source
    assert 'data-applitools-original-overflow' in driver.page_source
    eyes.close()


def test_check_element_with_original_driver(eyes, driver):
    eyes.open(driver, "Eyes Selenium SDK",
              "TestCheckElementWithOriginalDriver",
              {'width': 800, 'height': 600})
    driver.get('http://applitools.github.io/demo/TestPages/FramesTestPage/')

    element = driver.find_element_by_id('overflowing-div')