Exemplo n.º 1
0
 def shut_down_selenium_server(self):
     """Stop the previously started selenium-server and clean up any
     temporary files that were created."""
     try: SeleniumLibrary.shut_down_selenium_server(self)
     # error only is thrown when log file was not created,
     # this only happens when a previous sele-server was 
     # running that we didn't start
     except AttributeError: warn("stopped selenium server that we didn't start")
     else: self._user_ext_file.close()
Exemplo n.º 2
0
    def start_selenium_server(self, *params):
        """Start a selenium-server using extensions specified in the 
        constructor and selenium-server *params.

        Note that server params `port`, `timeout` and `userExtensions` are 
        not appliciable as they are specified in the wbSelenium 
        constructor."""
        if selenium_server_is_running(self._server_host, self._server_port):
            error = 'an instance of selenium-server on host %s, port %s is already running, please shutdown and rerun testcase' % (self._server_host, self._server_port) 
            warn(error)
            raise RuntimeError, error
        params += ('-port', str(self._server_port))
        if self._user_ext_file:
            params += ('-userExtensions', self._user_ext_file.name)
        SeleniumLibrary.start_selenium_server(self, *params) # unfortunatly this fails silently as well
        wait_until_server_has_started(self._server_host, self._server_port)
Exemplo n.º 3
0
 def report_js_errors(self):
     output = self.get_string('getAllJSErrors', [])
     if output=='':
         info('No JavaScript found on the current Page')
     else:
         warn('ERRORS!:' + output)
 def report_js_errors(self):
     output = self.get_string('getAllJSErrors', [])
     if output == '':
         info('No JavaScript found on the current Page')
     else:
         warn('ERRORS!:' + output)