Ejemplo n.º 1
0
 def __init__(self):
     super(FirefoxLocust, self).__init__()
     self.client = RealBrowserClient(
         webdriver.Firefox(),
         self.timeout,
         self.screen_width,
         self.screen_height
     )
Ejemplo n.º 2
0
 def __init__(self):
     super(PhantomJSLocust, self).__init__()
     self.client = RealBrowserClient(
         webdriver.PhantomJS(),
         self.timeout,
         self.screen_width,
         self.screen_height
     )
Ejemplo n.º 3
0
 def __init__(self, *args, **kwargs):
     super(ChromeLocust, self).__init__(*args, **kwargs)
     options = webdriver.ChromeOptions()
     if self.proxy_server:
         _LOGGER.info('Using proxy: ' + self.proxy_server)
         options.add_argument('proxy-server={}'.format(self.proxy_server))
     self.client = RealBrowserClient(
         webdriver.Chrome(chrome_options=options), self.timeout,
         self.screen_width, self.screen_height)
Ejemplo n.º 4
0
 def __init__(self):
     super(ChromeLocust, self).__init__()
     options = webdriver.ChromeOptions()
     if self.proxy_server:
         _LOGGER.info('Using proxy: ' + self.proxy_server)
         options.add_argument('proxy-server={}'.format(self.proxy_server))
     self.client = RealBrowserClient(
         webdriver.Chrome(executable_path='I:/bin/chromedriver',
                          chrome_options=options), self.timeout,
         self.screen_width, self.screen_height)
Ejemplo n.º 5
0
 def __init__(self):
     super(HeadlessFirefoxLocust, self).__init__()
     options = webdriver.FirefoxOptions()
     options.add_argument('--headless')
     driver = webdriver.Firefox(options=options)
     _LOGGER.info('Actually trying to run headless Firefox')
     self.client = RealBrowserClient(
         driver,
         self.timeout,
         self.screen_width,
         self.screen_height,
         set_window=False
     )
Ejemplo n.º 6
0
 def __init__(self, *args, **kwargs):
     super(HeadlessChromeLocust, self).__init__(*args, **kwargs)
     options = webdriver.ChromeOptions()
     options.add_argument('headless')
     options.add_argument('window-size={}x{}'.format(
         self.screen_width, self.screen_height))
     options.add_argument('disable-gpu')
     if self.proxy_server:
         _LOGGER.info('Using proxy: ' + self.proxy_server)
         options.add_argument('proxy-server={}'.format(self.proxy_server))
     driver = webdriver.Chrome(chrome_options=options)
     _LOGGER.info('Actually trying to run headless Chrome')
     self.client = RealBrowserClient(driver,
                                     self.timeout,
                                     self.screen_width,
                                     self.screen_height,
                                     set_window=False)