make screenshots
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import os
|
||||
|
||||
from selenium.webdriver.common.by import By
|
||||
|
||||
from screenshot_tests.utils.screenshots import TestCase
|
||||
@@ -6,15 +8,27 @@ import time
|
||||
|
||||
class TestExample(TestCase):
|
||||
def test_main_page(self):
|
||||
self.driver.get("https://s57.ivazh.ru/styles/r14/#12.13/71.2832/72.13405")
|
||||
self.driver.get("https://s57map.ivazh.ru/")
|
||||
|
||||
def action():
|
||||
time.sleep(5)
|
||||
time.sleep(2)
|
||||
|
||||
self.check_by_screenshot(None, full_page=True, action=action)
|
||||
|
||||
# def test_search_block(self):
|
||||
# self.driver.get("https://s57.ivazh.ru/styles/r14/#12.13/71.2832/72.13405")
|
||||
# self.driver.implicitly_wait(5)
|
||||
#
|
||||
# self.check_by_screenshot((By.CSS_SELECTOR, ".ol-mouse-position"))
|
||||
def test_search_block(self):
|
||||
self.driver.get("https://s57.ivazh.ru/styles/r14/#12.13/71.2832/72.13405")
|
||||
|
||||
def action():
|
||||
time.sleep(2)
|
||||
|
||||
self.check_by_screenshot_file(None, screenshot_path=f'test_search_block.png',
|
||||
full_page=True, action=action)
|
||||
|
||||
def test_save_screenshot(self):
|
||||
self.driver.get("https://s57.ivazh.ru/styles/r14/#12.13/71.2832/72.13405")
|
||||
|
||||
def action():
|
||||
time.sleep(2)
|
||||
|
||||
self.save_screenshot('test_search_block.png', full_page=True, action=action)
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
Reference in New Issue
Block a user