Skip to content

Commit

Permalink
py, ruby: Skipping profile cleaning step. This change proved to be st…
Browse files Browse the repository at this point in the history
…able enough in Java binding.
  • Loading branch information
barancev committed May 21, 2015
1 parent b9895de commit 9160eab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
16 changes: 6 additions & 10 deletions py/selenium/webdriver/firefox/firefox_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def launch_browser(self, profile):

self._start_from_profile_path(self.profile.path)
self._wait_until_connectable()

def kill(self):
"""Kill the browser.
Expand All @@ -83,14 +83,10 @@ def _start_from_profile_path(self, path):

if platform.system().lower() == 'linux':
self._modify_link_library_path()
command = [self._start_cmd, "-silent"]
command = [self._start_cmd, "-foreground"]
if self.command_line is not None:
for cli in self.command_line:
command.append(cli)

Popen(command, stdout=self._log_file, stderr=STDOUT,
env=self._firefox_env).communicate()
command[1] = '-foreground'
self.process = Popen(
command, stdout=self._log_file, stderr=STDOUT,
env=self._firefox_env)
Expand Down Expand Up @@ -141,7 +137,7 @@ def _find_exe_in_registry(self):

if not command:
return ""

return shlex.split(command)[0]

def _get_firefox_start_cmd(self):
Expand All @@ -150,7 +146,7 @@ def _get_firefox_start_cmd(self):
if platform.system() == "Darwin":
start_cmd = ("/Applications/Firefox.app/Contents/MacOS/firefox-bin")
elif platform.system() == "Windows":
start_cmd = (self._find_exe_in_registry() or
start_cmd = (self._find_exe_in_registry() or
self._default_windows_location())
elif platform.system() == 'Java' and os._name == 'nt':
start_cmd = self._default_windows_location()
Expand All @@ -161,7 +157,7 @@ def _get_firefox_start_cmd(self):
break
else:
# couldn't find firefox on the system path
raise RuntimeError("Could not find firefox in your system PATH." +
raise RuntimeError("Could not find firefox in your system PATH." +
" Please specify the firefox binary location or install firefox")
return start_cmd

Expand Down Expand Up @@ -201,7 +197,7 @@ def _extract_and_check(self, profile, no_focus_so_name, x86, amd64):
return built_path

def which(self, fname):
"""Returns the fully qualified path by searching Path of the given
"""Returns the fully qualified path by searching Path of the given
name"""
for pe in os.environ['PATH'].split(os.pathsep):
checkname = os.path.join(pe, fname)
Expand Down
8 changes: 0 additions & 8 deletions rb/lib/selenium/webdriver/firefox/launcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def launch
socket_lock.locked do
find_free_port
create_profile
start_silent_and_wait
start
connect_until_stable
end
Expand Down Expand Up @@ -81,13 +80,6 @@ def start
@binary.start_with @profile, @profile_dir, "-foreground"
end

def start_silent_and_wait
assert_profile

@binary.start_with @profile, @profile_dir, "-silent"
@binary.wait
end

def connect_until_stable
poller = SocketPoller.new(@host, @port, STABLE_CONNECTION_TIMEOUT)

Expand Down

0 comments on commit 9160eab

Please sign in to comment.