Skip to content

Commit 9160eab

Browse files
committed
py, ruby: Skipping profile cleaning step. This change proved to be stable enough in Java binding.
1 parent b9895de commit 9160eab

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

Diff for: py/selenium/webdriver/firefox/firefox_binary.py

+6-10
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def launch_browser(self, profile):
6868

6969
self._start_from_profile_path(self.profile.path)
7070
self._wait_until_connectable()
71-
71+
7272
def kill(self):
7373
"""Kill the browser.
7474
@@ -83,14 +83,10 @@ def _start_from_profile_path(self, path):
8383

8484
if platform.system().lower() == 'linux':
8585
self._modify_link_library_path()
86-
command = [self._start_cmd, "-silent"]
86+
command = [self._start_cmd, "-foreground"]
8787
if self.command_line is not None:
8888
for cli in self.command_line:
8989
command.append(cli)
90-
91-
Popen(command, stdout=self._log_file, stderr=STDOUT,
92-
env=self._firefox_env).communicate()
93-
command[1] = '-foreground'
9490
self.process = Popen(
9591
command, stdout=self._log_file, stderr=STDOUT,
9692
env=self._firefox_env)
@@ -141,7 +137,7 @@ def _find_exe_in_registry(self):
141137

142138
if not command:
143139
return ""
144-
140+
145141
return shlex.split(command)[0]
146142

147143
def _get_firefox_start_cmd(self):
@@ -150,7 +146,7 @@ def _get_firefox_start_cmd(self):
150146
if platform.system() == "Darwin":
151147
start_cmd = ("/Applications/Firefox.app/Contents/MacOS/firefox-bin")
152148
elif platform.system() == "Windows":
153-
start_cmd = (self._find_exe_in_registry() or
149+
start_cmd = (self._find_exe_in_registry() or
154150
self._default_windows_location())
155151
elif platform.system() == 'Java' and os._name == 'nt':
156152
start_cmd = self._default_windows_location()
@@ -161,7 +157,7 @@ def _get_firefox_start_cmd(self):
161157
break
162158
else:
163159
# couldn't find firefox on the system path
164-
raise RuntimeError("Could not find firefox in your system PATH." +
160+
raise RuntimeError("Could not find firefox in your system PATH." +
165161
" Please specify the firefox binary location or install firefox")
166162
return start_cmd
167163

@@ -201,7 +197,7 @@ def _extract_and_check(self, profile, no_focus_so_name, x86, amd64):
201197
return built_path
202198

203199
def which(self, fname):
204-
"""Returns the fully qualified path by searching Path of the given
200+
"""Returns the fully qualified path by searching Path of the given
205201
name"""
206202
for pe in os.environ['PATH'].split(os.pathsep):
207203
checkname = os.path.join(pe, fname)

Diff for: rb/lib/selenium/webdriver/firefox/launcher.rb

-8
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def launch
4949
socket_lock.locked do
5050
find_free_port
5151
create_profile
52-
start_silent_and_wait
5352
start
5453
connect_until_stable
5554
end
@@ -81,13 +80,6 @@ def start
8180
@binary.start_with @profile, @profile_dir, "-foreground"
8281
end
8382

84-
def start_silent_and_wait
85-
assert_profile
86-
87-
@binary.start_with @profile, @profile_dir, "-silent"
88-
@binary.wait
89-
end
90-
9183
def connect_until_stable
9284
poller = SocketPoller.new(@host, @port, STABLE_CONNECTION_TIMEOUT)
9385

0 commit comments

Comments
 (0)