I would like to interact with Safari directly, without using 'open -a
Safari' or cocoa, in order to launch Safari with a URL.
How about 'open <url>' ?
D P Schreber wrote:
How about 'open <url>' ?
No, I don't want to use 'open', I just want to do it via calling Safari directly. Firefox behaves appropriately when called directly and I
don't understand why it won't work for Safari.
D P Schreber wrote:
How about 'open <url>' ?
No, I don't want to use 'open', I just want to do it via calling Safari directly. Firefox behaves appropriately when called directly and I
don't understand why it won't work for Safari.
D P Schreber wrote:
How about 'open <url>' ?
No, I don't want to use 'open', I just want to do it via calling Safari directly. Firefox behaves appropriately when called directly and I
don't understand why it won't work for Safari.
D P Schreber wrote:
How about 'open <url>' ?
No, I don't want to use 'open', I just want to do it via calling Safari directly. Firefox behaves appropriately when called directly and I
don't understand why it won't work for Safari.
dave.hoover@gmail.com wrote:
D P Schreber wrote:
How about 'open <url>' ?
No, I don't want to use 'open', I just want to do it via calling Safari directly. Firefox behaves appropriately when called directly and I
don't understand why it won't work for Safari.
Safari may not understand the notion of command-line arguments.
D P Schreber wrote:
How about 'open <url>' ?
No, I don't want to use 'open', I just want to do it via calling Safari directly. Firefox behaves appropriately when called directly and I
don't understand why it won't work for Safari.
Based on his original description of the behavior, Safari *does*
understand command-line arguments. But it apparently treats them like
most Unix applications, as the name of a file, not a URL. That's why
Safari http://whatever
is like accessing the URL file://<path-to-current-dir>/http://whatever.
D P Schreber wrote:
How about 'open <url>' ?
No, I don't want to use 'open', I just want to do it via calling Safari directly.
Firefox behaves appropriately when called directly and I
don't understand why it won't work for Safari.
No, I don't want to use 'open', I just want to do it via calling Safari directly.
What possible difference could it make if your goal is as stated in the Subject?
No, I don't want to use 'open', I just want to do it via calling Safari directly.
What possible difference could it make if your goal is as stated in the Subject?
Here's the difference ... I am working on Selenium (http://openqa.org/selenium/), an open-source cross-browser functional testing tool. We have a config file that allows the tester to specify
which browsers to test with. The tester simply provides the name of
the browser and the path to the browser. Then when Selenium starts up,
it passes its URL to each configured browser. At this point Safari
chokes. So, I wrote some conditional logic (yuck) to check for Safari
and use "open -a Safari" instead. But then another problem comes up.
When we start up the browser, we hang onto its process ID in order to
kill it when the test has completed. Unfortunately 'open' creates its
own process and it is (seemingly) impossible for me to get ahold of
Safari's process ID, so I can't kill it.
Here's the difference ... I am working on Selenium (http://openqa.org/selenium/), an open-source cross-browser functional testing tool. We have a config file that allows the tester to specify
which browsers to test with. The tester simply provides the name of
the browser and the path to the browser. Then when Selenium starts up,
it passes its URL to each configured browser. At this point Safari
chokes. So, I wrote some conditional logic (yuck) to check for Safari
and use "open -a Safari" instead. But then another problem comes up.
When we start up the browser, we hang onto its process ID in order to
kill it when the test has completed. Unfortunately 'open' creates its
own process and it is (seemingly) impossible for me to get ahold of
Safari's process ID, so I can't kill it.
No, I don't want to use 'open', I just want to do it via calling Safari directly.
What possible difference could it make if your goal is as stated in the Subject?
Here's the difference ... I am working on Selenium (http://openqa.org/selenium/), an open-source cross-browser functional testing tool. We have a config file that allows the tester to specify
which browsers to test with. The tester simply provides the name of
the browser and the path to the browser. Then when Selenium starts up,
it passes its URL to each configured browser. At this point Safari
chokes. So, I wrote some conditional logic (yuck) to check for Safari
and use "open -a Safari" instead. But then another problem comes up.
When we start up the browser, we hang onto its process ID in order to
kill it when the test has completed. Unfortunately 'open' creates its
own process and it is (seemingly) impossible for me to get ahold of
Safari's process ID, so I can't kill it.
Try specifying "/Applications/Safari.app/Contents/MacOS/" as the path
and "Safari" as the name of the browser. Make sure that no other copy
of Safari is running at the time.
Well, there's always "killall Safari".
Tom Stiller wrote:
Try specifying "/Applications/Safari.app/Contents/MacOS/" as the path
and "Safari" as the name of the browser. Make sure that no other copy
of Safari is running at the time.
Unfortunately that doesn't work. The shell complains that "/Applications/Safari.app/Contents/MacOS//Applications/Safari.app/Contents/MacOS/" is a directory. Thanks
though.
Tom Stiller wrote:
Try specifying "/Applications/Safari.app/Contents/MacOS/" as the path
and "Safari" as the name of the browser. Make sure that no other copy
of Safari is running at the time.
Unfortunately that doesn't work. The shell complains that "/Applications/Safari.app/Contents/MacOS/" is a directory. Thanks
though.
I can see what you're saying regarding "alternative behavior could be considered a feature" when comparing Safari to other OS X bundles. But
I'm comparing it to other browsers. Because IE (on Windows) and
Firefox (on Mac and Windows) allow the user to pass an URL in from the command line, one begins to expect that behavior out of Safari.
No, I don't want to use 'open', I just want to do it via calling SafariWhat possible difference could it make if your goal is as stated in the
directly.
Subject?
Here's the difference ... I am working on Selenium (http://openqa.org/selenium/), an open-source cross-browser functional testing tool. We have a config file that allows the tester to specify
which browsers to test with. The tester simply provides the name of
the browser and the path to the browser. Then when Selenium starts up,
it passes its URL to each configured browser. At this point Safari
chokes. So, I wrote some conditional logic (yuck) to check for Safari
and use "open -a Safari" instead. But then another problem comes up.
When we start up the browser, we hang onto its process ID in order to
kill it when the test has completed. Unfortunately 'open' creates its
own process and it is (seemingly) impossible for me to get ahold of
Safari's process ID, so I can't kill it.
Sysop: | Gate Keeper |
---|---|
Location: | Shelby, NC |
Users: | 790 |
Nodes: | 20 (0 / 20) |
Uptime: | 41:58:13 |
Calls: | 12,115 |
Files: | 5,294 |
Messages: | 564,934 |