+1 vote
in Software Testing by (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.

by (1.6k points)
Have you set display variable in server and installed firefox or whatever browser you are using with selenium?
by (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
by Expert (5.9k points)
selected by
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.

by (920 points)
Thanks Himanshu for such a nice explanation, It solved my problem also.
by (1.6k points)
+1 for nice explanation.

Not a Member yet?

Ask to Folks Login

My Account

Your feedback is highly appreciated