diff --git a/example.py b/example.py deleted file mode 100644 index e5c67ee..0000000 --- a/example.py +++ /dev/null @@ -1,46 +0,0 @@ -from selenium import webdriver -from makereport import generate_report -import take_screenshot -'''Example SnippySnap application -This will screenshot two URLs using Selenium, then ask SnippySnap to compare it -to the previous screenshot and produce a report. -''' - - -def run(): - '''Runs everything''' - - # obtain a firefox web driver for Selenium - browser = webdriver.Firefox() - - items = [("http://localhost/example/example1.html", "example1.png"), - ("http://localhost/example/example2.html", "example2.png")] - - # lists for which images have/haven't changed - unchanged_images = [] - changed_images = [] - - for item in items: - - url = item[0] - filename = item[1] - - # open the webpage - browser.get(url) - - # do other webpage actions here - - # take a screenshot - same = take_screenshot.take_screenshot(browser, filename) - if same is True: - unchanged_images.append(filename) - else: - changed_images.append(filename) - - browser.quit() - - generate_report("outputs/report.html") - - -if __name__ == '__main__': - run() diff --git a/run.sh b/run.sh deleted file mode 100755 index 20e5182..0000000 --- a/run.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -#wrap running the script inside a virtual X server -xvfb-run -s "-screen 0 1920x1080x16" -a python3 example.py