Skip to content

Instantly share code, notes, and snippets.

@SergeyPirogov
Created March 28, 2017 12:10
Show Gist options
  • Save SergeyPirogov/093d3c2a58f22a93dc07a3a346d21cbd to your computer and use it in GitHub Desktop.
Save SergeyPirogov/093d3c2a58f22a93dc07a3a346d21cbd to your computer and use it in GitHub Desktop.
import atexit
from selene.api import *
from selenium.webdriver import DesiredCapabilities
from subprocess import call
from testcontainers import selenium
chrome = selenium.BrowserWebDriverContainer(DesiredCapabilities.CHROME).start()
config.browser_name = "chrome"
class TestMainPage(object):
# @classmethod
# def setup_class(cls):
# set_driver(chrome.get_driver())
#
@classmethod
def teardown_class(cls):
def allure():
call(['allure', 'generate report'])
atexit.register(allure)
def test_should_be_posts_test(self):
browser.visit("http://automation-remarks.com")
ss(".post").should_have(have.size(9))
def test_should_be_posts_test2(self):
browser.visit("http://automation-remarks.com")
ss(".post").should_have(have.size(9))
def test_should_be_posts_test3(self):
browser.visit("http://automation-remarks.com")
ss(".post").should_have(have.size(9))
def test_should_be_posts_test4(self):
browser.visit("http://automation-remarks.com")
ss(".post").should_have(have.size(9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment