Unable to run tests in Selenium Grid integrated with Linux Machine

171 views
Skip to first unread message

Umar Ashfaq Patwegar

unread,
Jan 21, 2019, 4:02:02 AM1/21/19
to Selenium Users
Hi All,

I have integrated the Selenium Grid from Linux Machine (Redhat), and running tests on Windows machine using the Selenium server version "selenium-server-standalone-3.141.59.jar" I amd able to run on some desktop but it is failing on most of the desktops. Need some advice. 

Below is the Error I am observing while running the tests.

error: { SessionNotCreatedError: Unable to create new service: ChromeDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: driver.version: unknown

If anyone has come across same problem, kindly suggest me the solution.

Regards,
Umar Ashfaq

Jayam, Vishnudeep

unread,
Jan 21, 2019, 4:08:06 AM1/21/19
to seleniu...@googlegroups.com
Hiiii Umar :)

May i know how did you configure selenium grid on Virtual Linux Machine ? Even i am trying to run automation scripts on jenkins environment (Virtual Linux system) but i don't know how to configure selenium chrome driver and selenium grid in jenkins :) Hope you will help and reply me! 


Thanking you,

Best Regards,
Vishnu Jayam!

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/94b59e0b-7c14-4d81-9631-bc9bf1296b5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanking you,

Best,

Vishnudeep Jayam
QA Engineer
_____________________________


Geschenkidee D&A GmbH / Regalos & Regali GmbH
Eberswalder Straße 6-9
10437 Berlin




Geschenkidee D&A GmbH
Zuständiges Gericht: Amtsgericht Berlin, HRB 139503B, EU VAT-ID: DE281888778

Regalos & Regali GmbH
Zuständiges Gericht: Amtsgericht Berlin, HRB 153466B, EU VAT-ID: DE292411380

⇜Krishnan Mahadevan⇝

unread,
Jan 21, 2019, 4:08:55 AM1/21/19
to Selenium Users
The first place you should start looking at is those specific machines on which this is failing and ensure that:
1. Chromedriver binary is available in the PATH
2. The chromedriver binary is the updated one which corresponds to the chrome browser.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ http://rationaleemotions.wordpress.com/


--

⇜Krishnan Mahadevan⇝

unread,
Jan 21, 2019, 4:10:23 AM1/21/19
to Selenium Users
@Vishnudeep,
What exactly is this virtual linux machine that you are referring to? Are you talking about a displayless unix machine wherein you need to start off by running an Xvfb instance to get the display configured ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ http://rationaleemotions.wordpress.com/

Jayam, Vishnudeep

unread,
Jan 21, 2019, 4:26:24 AM1/21/19
to seleniu...@googlegroups.com
Hello Krishnan Mahadevan,

No No! my devops colleuge developed a jenkins environment which runs on Virtual Linux Machine! 

I have developed selenium automation scripts using cucumber tool and i am successfully able to run them in jenkins locally! but when i tried to configure on jenkins machine which is running on virtual linux environment ,  the tests fail because the chrome driver is not reachable because i din't set up chrome.exe in jenkins system!

Please look below for the images

This is the code in my repo
2019-01-18 10_25_35-eclipse-workspace - com.gide.cucumber_src_test_java_userStepDefinations_BaseClas.png

This is the error that i am getting when i try to run tests on Virtual linux machine where jenkins is up and running!

2019-01-21 10_19_33-TESTS » QA Automation #3 Console [Jenkins].png

Please let me know if you have got any further questions!

Thanking you,

Best Regards,
Vishnudeep




For more options, visit https://groups.google.com/d/optout.

⇜Krishnan Mahadevan⇝

unread,
Jan 21, 2019, 4:42:33 AM1/21/19
to Selenium Users
You have got a lot of things done incorrectly.

First things first.

Add the location of your "chromedriver.exe"/"chromedriver" binary to the PATH variable. 
That way you get rid of the dependency of specifying its location via the code.

If adding it in the PATH is not possible, then you should try specifying its location via the JVM argument.
This change needs to be done in your BaseClass.

I re-iterate my question. What is this "virtual linux machine" that you are talking about?
Apart from the obvious meaning that its a VM (Virtual Machine which is running on a Linux OS) what additional details can you provide? 
Usually when devops folks setup a machine to run Jenkins, they have the machine configured in a headless mode [ i.e., there will not be any GUI defined for the machine and the machine is intended to be used only via the terminal ]. If that's the case, then you would need to install 

1. Chrome browser and all its supporting libraries
2. Chrome Driver binary
3. Xfvb (for giving a temporary display to the headless unix machine)

which IMO is a lot of work. You should instead just try spinning off a selenium-standalone chrome browser supporting docker container and have your tests run against it.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ http://rationaleemotions.wordpress.com/

Jayam, Vishnudeep

unread,
Jan 21, 2019, 4:56:47 AM1/21/19
to seleniu...@googlegroups.com
Hello Krishnan,

I had a talk with my Devops guy and he said that it's a VM configured in a headless mode where the machine is used only via the terminal! I hope that i will be able to able to do it!

Thanks a lot for your help and suggestions! And sorry i was not clear before :)

Have a nice day!


For more options, visit https://groups.google.com/d/optout.

Jayam, Vishnudeep

unread,
Jan 21, 2019, 11:04:43 AM1/21/19
to seleniu...@googlegroups.com
Hey Krishnan Mahadevan,

Thanks a lot for the information and the heads-up! i tried these
1. Chrome browser and all its supporting libraries
2. Chrome Driver binary

And I changed the Baseclass file a bit as follows :) 

2019-01-21 17_02_23-eclipse-workspace - com.gide.cucumber_src_test_java_userStepDefinations_BaseClas.png
 
And was able to run automation tests on jenkins server! 

You made my DAY!!! 

Thanks again bro :)

Umar Ashfaq Patwegar

unread,
Feb 9, 2019, 4:01:35 AM2/9/19
to seleniu...@googlegroups.com
Thanks Krishnan for your suggestion, 

Problem what I was facing was Selenium Hub was triggering the node but on Node machine the browser was not opening.. But after going through some of solutions of stackoverflow i found one solution which is partially even suggested by you..

Solution was on node machine i started the Node by specifying the chromedriver path and it worked.

@Jayam, sorry for late response.. well you cracked it buddy.. 

I am working on Selenium driver with nodeJS and able to run node program on Linux machine. And because of Selenium grid, able to launch the browser on Connected desktop.

Venkat Jyesta

unread,
Jul 14, 2021, 7:49:11 AM7/14/21
to Selenium Users
Hi Vishnudeep,
I am also facing same issue. 

My Jenkins has Linux node and I am working with Windows OS.
Can I use same code which you used ? Will that work ?
Reply all
Reply to author
Forward
0 new messages