def beforeTest(self, test):
        """ Running Selenium locally will be handled differently
            from how Selenium is run remotely, such as from Jenkins. """

        if self.options.headless:
            self.display = Display(visible=0, size=(1200, 800))
            self.display.start()
            self.headless_active = True
        if self.options.servername == "localhost":
            try:
                self.driver = self.__select_browser(self.options.browser)
                test.test.driver = self.driver
                if "version" in self.browser_settings.keys():
                    version = self.browser_settings["version"]
                else:
                    version = ""
                test.test.browser = "%s%s" % (self.options.browser, version)
                test.test.demo_mode = self.options.demo_mode
                test.test.demo_sleep = self.options.demo_sleep
            except Exception as err:
                print "Error starting/connecting to Selenium:"
                print err
                os.kill(os.getpid(), 9)
        else:
            connected = False
            for i in range(1, 4):
                try:
                    self.driver = self.__select_browser(self.options.browser)
                    test.test.driver = self.driver
                    if "version" in self.browser_settings.keys():
                        version = self.browser_settings["version"]
                    else:
                        version = ""
                    test.test.browser = "%s%s" % (
                        self.options.browser, version)
                    connected = True
                    break
                except Exception as err:
                    print "Attempt #%s to connect to Selenium failed" % i
                    if 3 < i:
                        print "Retrying in 3 seconds..."
                        time.sleep(3)
            if not connected:
                print "Error starting/connecting to Selenium:"
                print err
                print "\n\n"
                os.kill(os.getpid(), 9)
dataset/ETHPy150Open mdmintz/SeleniumBase/seleniumbase/plugins/selenium_plugin.py/SeleniumBrowser.beforeTest/swapped operands of `<`