Selenium Server for Firefox 5 in (Unix or ubuntu)

1,281 views
Skip to first unread message

Reaz Patwary

unread,
Jun 23, 2011, 12:57:48 PM6/23/11
to QA_Help4all
Just fixed the selenium server for firefox 5:

I received the link for Firefox 4 but i followed the same steps to
make it work with 5:
here is the link: http://www.qaautomation.net/?p=245

really easy guys : follow the step below:

1.Create a directory where you could manipulate the jar’s contents.
mkdir ~/selenium103

2.Copy your selenium-server.jar file in the newly created directory
and cd into it.
cp selenium-server.jar ~/selenium103/.
cd ~/selenium103
Unzip the jar files contents here and delete the jar file.
unzip selenium-server.jar
rm selenium-server.jar

3.First find all the *.rdf files – you should see 5 of them:
find . -name "*.rdf"
./customProfileDirCUSTFF/extensions/{538F0036-F358-4f84-
A764-89FB437166B4}/install.rdf
./customProfileDirCUSTFF/extensions/ready...@openqa.org/install.rdf
./customProfileDirCUSTFFCHROME/extensions/{503A0CD4-
EDC8-489b-853B-19E0BAA8F0A4}/install.rdf
./customProfileDirCUSTFFCHROME/extensions/{538F0036-F358-4f84-
A764-89FB437166B4}/install.rdf
./customProfileDirCUSTFFCHROME/extensions/ready...@openqa.org/
install.rdf

4.In each of these files you will see
<em:maxVersion>3.6.*</em:maxVersion>

5.Change them to
<em:maxVersion>5.*</em:maxVersion>

6.all the files are now patched. To jar them back up run the following
steps:

zip -r selenium-server *
mv selenium-server.zip selenium-server.jar
jar -cvfm selenium-server.jar META-INF/MANIFEST.MF *




Then

1.Run Selenium server in interactive mode. To do this run the command:
java -jar selenium-server.jar -interactive -singleWindow

2.Start new selenium browser session using the command:
cmd=getNewBrowserSession&1=*firefox&2=http://www.google.com

3.If you see a line saying Preparing Firefox profile... and no
progress beyond that, there is a high likelihood that the Firefox
browser version you have is not supported by your version of selenium
server jar you have. If you have Firefox 4 and selenium 1.0.3, the
next section shows how to fix the problem.

4.If you don’t see a problem, run the following command:
cmd=open&1=http://www.google.com

Reaz Patwary

unread,
Jun 23, 2011, 1:01:50 PM6/23/11
to QA_Help4all
Forgot to mention after all this start selenium server and run your
test. if its still gives you problem do restart your computer. start
server and run your test!!


Happy testing guys!!



Still couldnt fix email me . i will send you the .jar file (BTW forgot
to mention this patch for Java)

My copy is working great.


Reaz
qat...@gmail.com
Qa Architect
Pontiflex Inc
linkedin:http://www.linkedin.com/in/reazpatwary

On Jun 23, 12:57 pm, Reaz Patwary <qats...@gmail.com> wrote:
> Just fixed the selenium server for firefox 5:
>
> I received the link for Firefox 4 but i followed the same steps to
> make it work with 5:
> here is the link:http://www.qaautomation.net/?p=245
>
> really easy guys : follow the step below:
>
> 1.Create a directory where you could manipulate the jar’s contents.
> mkdir ~/selenium103
>
> 2.Copy your selenium-server.jar file in the newly created directory
> and cd into it.
> cp selenium-server.jar ~/selenium103/.
> cd ~/selenium103
> Unzip the jar files contents here and delete the jar file.
> unzip selenium-server.jar
> rm selenium-server.jar
>
> 3.First find all the *.rdf files – you should see 5 of them:
> find . -name "*.rdf"
> ./customProfileDirCUSTFF/extensions/{538F0036-F358-4f84-
> A764-89FB437166B4}/install.rdf
> ./customProfileDirCUSTFF/extensions/readyst...@openqa.org/install.rdf
> ./customProfileDirCUSTFFCHROME/extensions/{503A0CD4-
> EDC8-489b-853B-19E0BAA8F0A4}/install.rdf
> ./customProfileDirCUSTFFCHROME/extensions/{538F0036-F358-4f84-
> A764-89FB437166B4}/install.rdf
> ./customProfileDirCUSTFFCHROME/extensions/readyst...@openqa.org/

Hema Namani

unread,
Aug 7, 2013, 7:55:14 AM8/7/13
to qahel...@googlegroups.com
Hi Reaz,

I tried the process which you have mentioned below for firefox version -23.

After I change the version in all the 5 files that you have mentioned, I have recreated selenium-server-2.34.0.jar file  (I am using latest selenium rc)
and when used command: java -jar selenium-server-2.34.0.jar -interactive -singleWindow 

below exception are seen:


E:\selenium-remote-control-1.0.3\hema>java -jar selenium-server-2.34.0.jar -inte
ractive -singleWindow
Aug 07, 2013 5:21:34 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lo
gging/LogFactory
        at org.openqa.selenium.server.SeleniumServer.configureLogging(SeleniumSe
rver.java:291)
        at org.openqa.selenium.server.SeleniumServer.<init>(SeleniumServer.java:
274)
        at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:24
4)
        at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:93)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFacto
ry
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 4 more

Could you please help me regarding this issue?

Thanks,
Hema

Hema Namani

unread,
Aug 7, 2013, 8:19:19 AM8/7/13
to qahel...@googlegroups.com
The same process i tried with Sleenium rc version-1.0.3 for firefox version-23

The Selenium rc-1.0.3 server got started with below command:
java -jar selenium-server.jar -interactive -singleWindow 

but when i tried to execute the below code:
import com.thoughtworks.*;
import com.thoughtworks.selenium.*;
import com.thoughtworks.selenium.condition.*;

public class Google_Test {
public static void main(String[] args)
{
Selenium selenium = new DefaultSelenium("localhost",4444,"*firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefix.exe","http://www.w3schools.com");
selenium.start();
}

}

I see below exceptions:

Exception in thread "main" java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: org.openqa.selenium.server.browserlaunchers.InvalidBrowserExecutableException: The specified path to the browser executable is invalid.
at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:89)
at Google_Test.main(Google_Test.java:11)
Caused by: com.thoughtworks.selenium.SeleniumException: Failed to start new browser session: org.openqa.selenium.server.browserlaunchers.InvalidBrowserExecutableException: The specified path to the browser executable is invalid.
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:262)
at com.thoughtworks.selenium.HttpCommandProcessor.start(HttpCommandProcessor.java:223)
at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:81)
... 1 more
Reply all
Reply to author
Forward
0 new messages