def test_create_bot(self): """Create a bot.""" config.ready = True from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert bot
def test_bot_using_phantomjs(self): """Create a bot.""" config.ready = True config.extend({'webdriver_type': u'phantomjs'}) from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert isinstance(bot.driver, webdriver.PhantomJS)
def test_bot_using_chrome(self, active_config): """Create a bot.""" active_config.extend({"webdriver_type": u"chrome"}) from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert isinstance(bot.driver, webdriver.Chrome)
def test_bot_using_chrome(self): """Create a bot.""" return config.ready = True config.extend({'webdriver_type': u'chrome'}) from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert isinstance(bot.driver, webdriver.Chrome)
def test_bot_using_phantomjs(self, active_config): """Create a bot.""" active_config.extend({"webdriver_type": u"phantomjs"}) from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert isinstance(bot.driver, webdriver.PhantomJS) bot.driver.quit()
def test_bot_using_firefox(self): """Create a bot.""" return config.ready = True config.extend({"webdriver_type": u"firefox"}) from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert isinstance(bot.driver, webdriver.Firefox)
def test_bot_using_webdriver_chrome(self): """Create a bot.""" config.ready = True config.extend({ 'webdriver_type': u'chrome', 'webdriver_url': pytest.config.getvalue("webdriver").decode("ascii") }) from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert isinstance(bot.driver, webdriver.Remote) assert bot.driver.capabilities['browserName'] == 'chrome'
def test_bot_using_webdriver_chrome(self, active_config): """Create a bot.""" active_config.extend({ "webdriver_type": u"chrome", "webdriver_url": self._config.getvalue("webdriver").decode("ascii"), }) from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert isinstance(bot.driver, webdriver.Remote) assert bot.driver.capabilities["browserName"] == "chrome"
def test_bot_using_webdriver_firefox(self): """Create a bot.""" config.ready = True config.extend({ "webdriver_type": u"firefox", "webdriver_url": pytest.config.getvalue("webdriver").decode("ascii"), }) from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert isinstance(bot.driver, webdriver.Remote) assert bot.driver.capabilities["browserName"] == "firefox"
def test_bot_driver_default_is_phantomjs(self, active_config): from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert isinstance(bot.driver, webdriver.PhantomJS) bot.driver.quit()
def test_create_bot(self, active_config): """Create a bot.""" from dallinger.bots import BotBase bot = BotBase("http://dallinger.io") assert bot