Thanks,
Davina
Could not start Selenium session: Failed to start new browser session:
java.lang.RuntimeException: Firefox 3 could not be found in the path!
Please add the directory containing ''firefox-bin' or 'firefox'' to
your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3/blah/blah/firefox-bin
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
On Jan 29, 1:22 pm, Neha Chachra <neha.chac...@gmail.com> wrote:
> Can you paste here the contents of your crontab here?
>
> Thanks,
> -Neha
>
> On Fri, Jan 29, 2010 at 11:33 AM, Davina Armstrong <dstaras...@gmail.com>wrote:
>
> > I've got a script that launches selenium-server, runs a bunch of
> > tests, and shuts down selenium-server. It works great from the
> > command line, but when I try to run it with crontab, I get the error
> > below. What is meant by "explicitly specify a path to Firefox 3"?
> > Where do I specify it?
>
> > Thanks,
> > Davina
>
> > Could not start Selenium session: Failed to start new browser session:
> > java.lang.RuntimeException: Firefox 3 could not be found in the path!
> > Please add the directory containing ''firefox-bin' or 'firefox'' to
> > your PATH environment
> > variable, or explicitly specify a path to Firefox 3 like this:
> > *firefox3/blah/blah/firefox-bin
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Selenium Users" group.
> > To post to this group, send email to seleniu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > selenium-user...@googlegroups.com<selenium-users%2Bunsu...@googlegroups.com>
"Could not start Selenium session: Failed to start new browser
session: Error while launching browser"
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
When you run the script from the command line all the environment
variables are defined for you according to your login. When you add
the command to crontab, the cron daemon probably runs the command as a
different user. Thus the environment variables are different.
This means that not only the path but other environment variables will
be different. There are a few possible solutions.
Some systems have a command to run a process as a different user. The
command might be something like 'runas'. So if your command line was
'foo fee fum' you would change it to 'runas -u darrell -c "foo fee
fum"' or something like that. You'd have to do some research to see if
your system has such a set up and what the command is.
Other systems have permission settings (chmod). You can change the
permission of an executable and it will run as the user who owns it.
Check the man page on chmod to see if your system uses this method.
Another option is to figure out which user is used to run cron tasks
and update that user's environment to match your own.
Darrell