def setUpClass(cls):
     global sel
     print 'Start Selenium<-------------------------------'
     sel = selenium('localhost', 4444,
                    config['rc_configuration']['command'],
                    'http://workflowy.com')
     sel.start()
     sel.open('http://workflowy.com', True)
Example #2
0
	def selenium_init(self,browser,url):
		sel = selenium('localhost', 4444, browser, url)
		sel.start()
		# sel.open(para)
		sel.set_timeout(60000)
		sel.window_focus()
		sel.window_maximize()
		return sel
Example #3
0
    def setUp(self):
        """
        Makes sure that the tests start from a fresh slate, and starts
        the server.
        """
        self.nb_options = copy.deepcopy(NB_OPTIONS)
        self.nb_options['directory'] = (
            self.nb_options['directory']
            or os.path.join(tempfile.gettempdir(), 'sagenb_tests.sagenb'))
        self.sel_options = copy.deepcopy(SEL_OPTIONS)

        self.cleanup()
        os.mkdir(self.nb_options['directory'])
        self.start_notebook(initial=True)

        self.selenium = selenium(self.sel_options['server_host'],
                                 self.sel_options['server_port'],
                                 self.sel_options['environment'],
                                 self.sel_options['browser_url'])
        self.selenium.start()
        self.selenium.open("/")
Example #4
0
    def setUp(self):
        """
        Makes sure that the tests start from a fresh slate, and starts
        the server.
        """
        self.nb_options = copy.deepcopy(NB_OPTIONS)
        self.nb_options['directory'] = (self.nb_options['directory'] or
                                        os.path.join(tempfile.gettempdir(),
                                                     'sagenb_tests.sagenb'))
        self.sel_options = copy.deepcopy(SEL_OPTIONS)

        self.cleanup()
        os.mkdir(self.nb_options['directory'])
        self.start_notebook(initial=True)

        self.selenium = selenium(self.sel_options['server_host'],
                                 self.sel_options['server_port'],
                                 self.sel_options['environment'],
                                 self.sel_options['browser_url'])
        self.selenium.start()
        self.selenium.open("/")
 def setUp(self):
     """
     Makes sure that the tests start from a fresh slate, and starts
     the server.
     """
     self.temp_dir = os.path.join(tempfile.gettempdir(), 'sagenb_tests')
     if os.path.exists(self.temp_dir + '.sagenb'):
         twistd_pid_path = os.path.join(self.temp_dir + '.sagenb', 'twistd.pid')
         if os.path.exists(twistd_pid_path):
             twistd_pid = int(open(twistd_pid_path, 'r').read())
             try:
                 os.kill(twistd_pid, signal.SIGTERM)
                 os.kill(twistd_pid, signal.SIGKILL)
             except OSError:
                 pass
         shutil.rmtree(self.temp_dir + '.sagenb')
     os.mkdir(self.temp_dir + '.sagenb')
     self.verification_errors = []
     self.start_notebook(initial=True)
     self.selenium = selenium("localhost", 4444, "*firefox3 /usr/bin/firefox", "http://localhost:%d" % self.sagenb_port)
     self.selenium.start()
     self.selenium.open("/")
Example #6
0
 def setUpClass(cls):
     global sel
     print 'Start Selenium<-------------------------------'
     sel = selenium('localhost', 4444, config['rc_configuration']['command'], 'http://workflowy.com')
     sel.start()
     sel.open('http://workflowy.com', True)
Example #7
0
 def setUp(self):
     self.sel = selenium('127.0.0.1', 4444, '*firefox',
                         'https://www.baidu.com')
     self.sel.start()