def test_create_bot(self):
        """Create a bot."""
        config.ready = True
        from dallinger.bots import BotBase

        bot = BotBase("http://dallinger.io")
        assert bot
Exemple #2
0
 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)
Exemple #3
0
    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)
Exemple #4
0
 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)
Exemple #5
0
    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)
Exemple #7
0
 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'
Exemple #8
0
    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"
Exemple #10
0
    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()
Exemple #11
0
    def test_create_bot(self, active_config):
        """Create a bot."""
        from dallinger.bots import BotBase

        bot = BotBase("http://dallinger.io")
        assert bot