Javascript Webdriver (Chrome)

77 views
Skip to first unread message

simon drake

unread,
Jun 5, 2015, 6:10:16 AM6/5/15
to jenkins...@googlegroups.com
Hi all,

I have recently built a 'test pack', which uses Javascript Webdriver and Chromedriver, which all successfully runs from my local machine. I have then committed it up to Github and am attempting to use it through Jenkins; here starts the problems!

A new 'freestyle project' has been created and the Github repo linked to it. Whenever I run that project I use the 'Execute Shell' option and run 'npm install' and 'npm test' commands from it. Everything works fine until it gets to the point of actually running the tests; it times out every time (I've tried increasing the timeout to 15 minutes for test purposes and it still fails).

The strange thing is I can log on directly to the Jenkins server, open a command window in the workspace, and run the same commands successfully (without timeout).

I've checked all the Paths etc but I cannot work out why it wouldn't work through the GUI.

Appreciate any help anybody can give...

Richard Bywater

unread,
Jun 5, 2015, 7:20:03 PM6/5/15
to jenkins...@googlegroups.com

You haven't said what OS you are using - without that info it's a little hard to guess as what issue you might be hitting :)

Richard


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3ada2387-60af-4aeb-8e35-1f51f62648ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

simon drake

unread,
Jun 8, 2015, 6:10:25 AM6/8/15
to jenkins...@googlegroups.com
Hi Richard,

Apologies! We are using Windows (the Jenkins server is Windows Server 2012).

simon drake

unread,
Jun 9, 2015, 8:22:23 AM6/9/15
to jenkins...@googlegroups.com
Any help would be most appreciated :-)

Richard Bywater

unread,
Jun 9, 2015, 7:09:39 PM6/9/15
to jenkins...@googlegroups.com

Sorry missed your earlier reply.

Do you have the service setup to allow interaction with the display? (From memory that means NOT running as local system account)

Richard


On 12:22AM, Wed, 10/06/2015 simon drake <simondr...@googlemail.com> wrote:
Any help would be most appreciated :-)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

simon drake

unread,
Jun 10, 2015, 4:34:42 AM6/10/15
to jenkins...@googlegroups.com
Certainly no need for apologies :-) I'm aware that these posts can get chucked down the list quite fast so I thought I'd bump it just in case! I appreciate that you are replying in the first place!

It IS running as a local system account; apologies for the stupid question but what should it run as so that it can interact with the display?

Si

Richard Bywater

unread,
Jun 10, 2015, 5:50:42 AM6/10/15
to jenkins...@googlegroups.com

IIRC (and it might not be right as haven't used Windows services for a while) but you need to give it a normal user account (whether it's a domain account or just local) to be able to tick the Interact with desktop check box.

Hopefully I don't have it completely backwards and the system account is needed for that :)

Richard


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

simon drake

unread,
Jun 10, 2015, 6:03:52 AM6/10/15
to jenkins...@googlegroups.com
Thanks :-)

I'll give that a go. Do you happen to know whether that should be changed on the Jenkins Service or on the Apache Tomcat programme? I suspect both will do the same!

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/ujwkOqV8dWY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMui946mPDSXeS%3DxfPokpiNEs3vpa-F5UFG0Cmxppaj_NgsQ7A%40mail.gmail.com.

Richard Bywater

unread,
Jun 10, 2015, 6:24:10 AM6/10/15
to jenkins...@googlegroups.com

Jenkins service as it would be that service kicking off the browser process which then, presumably, would connect to the Tomcat instance via HTTP(S)

Richard


simon drake

unread,
Jun 10, 2015, 6:34:07 AM6/10/15
to jenkins...@googlegroups.com
Thanks mate :-)

I'll give it a go!

simon drake

unread,
Jun 10, 2015, 8:40:38 AM6/10/15
to jenkins...@googlegroups.com
Hi Richard,

I just gave this a go but have noticed that you have to use the 'Local System Account' to enable the ability to 'Allow service to interact with desktop'. I amended it to a admin user anyway, just to give it a try, but it still times out.

Any ideas ?

Si
330.gif

Richard Bywater

unread,
Jun 10, 2015, 3:54:33 PM6/10/15
to jenkins...@googlegroups.com

That's no good... One other thought off the top of my head is, as I think the chrome driver uses TCPIP to communicate I wonder if the Windows firewall might be blocking things?

Unfortunately that's the only other thought I have at the moment!

Richard


simon drake

unread,
Jun 11, 2015, 8:45:19 AM6/11/15
to jenkins...@googlegroups.com
Hi mate,

So I decided to put your theory to the test :-). I downgraded my firefox (after some investigation Webdriver doesn't seem to work with 38) and I changed my tests to run with Firefox and it worked from the Jenkins GUI (albeit with a test error which I'm trying to figure out now!). Something to do with Chrome then!

Thank you for all the help you've given me! Short of finding out what I'd need to open up on the firewall I think I'll have to accept defeat with using the Chromedriver (for now)!

330.gif

Richard Bywater

unread,
Jun 11, 2015, 5:33:03 PM6/11/15
to jenkins...@googlegroups.com
Cool - good to hear that I could help and that you are (at least partly) up and running.

Re the firewall issue, I found this page - http://blogs.technet.com/b/bruce_adamczak/archive/2013/04/02/windows-2012-core-survival-guide-firewalls.aspx - which might give you some clues as to where to look for what is being blocked potentially (I assume Windows would be logging the fact that Jenkins wasn't allowed to talk to Chrome or something - but then again I'm often wrong when it comes to assumptions about Windows ;) )

Richard.

Reply all
Reply to author
Forward
0 new messages