Hey there! any question in your mind? Ask It Now!.

Popular Categories

Running selenium in apache server.

+1 vote
asked in Software Testing by tester007 (920 points)

Hello guys i am trying to run selenium test cases in server by servlet but after deploying war  file in apache server when i am running it so this error is coming :


$:: No display available

Server is linux server 

If any one of you faced the same problem and solved it So please help me out!

Thanks is advance.

commented by tester (1,550 points)
Have you set display variable in server and installed firefox or whatever browser you are using with selenium?
commented by tester007 (920 points)
Hello thanks for comment yes I already set display variable and installed browser,Even when I am exporting display to my local machine its working fine browser is opening and test cases are rulling well, how ever when I am trying to run the testcases in server facing the problem described above.

1 Answer

+2 votes
answered by Himanshu Expert (5,940 points)
selected by tester007
Best answer

Hello guys i was facing the same problem when I deployed my selenium war in linux server and after RnD find a solution for the same.


You have to simple follow these steps :


1.  Install VNC its a chrome extension or any remote desktop software.

2.  In which server you have deployed your application like i was using TomCat server ,So run the TomCat server after taking remote of your virtual server .

3.  Now run the servlet from any client machine , Its done, Now you can close the virtual server window test cases will be running in server.


Here when we take remote of server so we are providing a complete desktop to the server and when we now run the test cases server executes them same as in desktop even we have closed remote window.


I hope you got my point.

commented by tester007 (920 points)
Thanks Himanshu for such a nice explanation, It solved my problem also.
commented by tester (1,550 points)
+1 for nice explanation.

Related Questions

0 votes
1 answer 481 views
+3 votes
2 answers 223 views
+1 vote
1 answer 698 views

Not a Member yet?

Ask to Folks Login

My Account
325 Folks are online
0 members and 325 guest online
Your feedback is highly appreciated