Added manga-py source

This commit is contained in:
2019-12-14 22:33:14 -05:00
parent 9a4dd4b09b
commit 45067caea6
420 changed files with 18054 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import unittest
from pyvirtualdisplay import Display
from selenium.common.exceptions import NoSuchElementException
from manga_py.base_classes import WebDriver
class TestWebDriver(unittest.TestCase):
def test_driver(self):
display = Display(visible=0, size=(800, 600))
display.start()
driver = WebDriver().get_driver()
driver.get('https://ya.ru')
result = True
try:
driver.find_element_by_id('text')
except NoSuchElementException:
result = False
driver.close()
display.stop()
self.assertTrue(result)