Selenium is unable to start Firefox when run through Jenkins - selenium

When I run test locally, I'm able to run all my Selenium tests on Firefox. But when trying to run same through Jenkins it fails to start Firefox and no error message displayed.
I'm using below configurations
Selenium 3.0.2,
Jenkins 1.1.0,
Firefox 50.0.2
Chrome works fine through Jenkins

Related

selenium-side-runner does not run Selenium IDE script

We are recording test scripts with Selenium IDE on a salesforce website without lightning. Tests run fine in selenium IDE but when we try using selenium side runner it fails. It cannot locate element by linkText.

Robotframework selenium execution through jenkins not working

I am not able to execute selenium test cases using robotframework through Jenkins.
Installed
Firefox, geekodriver.
Works without using Jenkins.
Getting the exception
WebDriverException: Message: Process unexpectedly closed with status: 1
Its a simple test case that has
*** Settings ****
Library Selenium2Library
*** Test Cases ***
Testing Selenium
Open Browser http://google.com Firefox
Jenkins shell command configuration
pybot test.robot
Install xvfb in the robotframework server. Also use xvfb plugin in Jenkins.
Seems like xvfb is deprecated and heard that there is a vncserver plugin. Need to try this.

Selenium not finding elements in Firefox when run via Jenkins

I have a suite of Nightwatch tests that I regularly run across multiple browsers on Windows 10
Recently selenium has been unable to locate any elements when running Firefox through a local instance of Jenkins that is run as a Windows service. Firefox uses geckodriver webdriver in Nightwatch.
Test run flawlessly when run locally via cmd or git bash etc.
Anyone have any idea what may be causing this issue.
Versions installed:
Geckodriver v.0.19.1
Firefox v.57.0.4
Nightwatch v0.9.19
Selenium-server-standalone-3.8.1
Failure trace snippet
Starting selenium server... started - PID: 3804
[Widgets\ C36310 Widgets Available On Dispatch] Test Suite
==============================================================
Running: C36310 Widgets Available On Dispatch
√ Details & Strings Loaded
√ Home Page Element Selectors Loaded
× Check For Visibility Of Sign In Banner. - expected "visible" but got:
"not visible"
at Object.exports.command (C:\Users\matthewf\Documents\master-ui\workspace\Workspaces\master_eld\src\resources\custom_commands\login.js:22:6)

Selenium IDE and Headless Browser Testing

How do I run test cases made with Selenium IDE (Firefox Plugin) in a headless browser?
When I create test cases with the firefox plugin it saves them as .html files.
I am trying to setup a way of running them in a headless browser, (using phantomJS or another tool/lib). I have seen many people mention running firefox in a hidden frame, but this is not the same as headless (ie. PhantomJS)
I have already figured out how to run selenium test cases from command line, but only in firefox or ie, I can't get it to run .html testcases on phantomjs:
java -jar selenium-server-standalone-2.39.0.jar -htmlSuite "*firefox" "http://127.0.0.1" "ts-ProjectList/TestSuite.html" "ProjectList-results.html"
I know the IDE can export test cases in different languages, but I want non-tech team members to be able to create tests using the firefox plugin.
Have you looked at http://code.tutsplus.com/tutorials/headless-functional-testing-with-selenium-and-phantomjs--net-30545?
Changing "*firefox" to phantomjs should get you started.
You'll need the phantomJS driver:
http://selenium.googlecode.com/svn/trunk/docs/api/py/webdriver_phantomjs/selenium.webdriver.phantomjs.webdriver.html

[Vagrant][Jenkins][Behat][Selenium] How to combine them?

I have a project with some requirements: install jenkins, selenium, behat on a Vagrant box with ubuntu 12.04. I installed jenkins, selenium, behat on this box. When i run selenium, jenkins and run some behat test, the error display :
- Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: no display specified
Error: no display specified
I installed firefox and use selenium-server-standalone-2.35.0.
firefox -v
Mozilla Firefox 24.0
What should i do?
Thanks
Its most likely that your Jenkins user does not have an X session to run firefox in.
You can use something like Xvfb which is a virtual frame buffer How do I run Selenium in Xvfb?
Alternatively you could use phantomjs/ghostdriver which is a totally headless webdriver for selenium https://github.com/detro/ghostdriver - so you don't need any X at all.
I personally run a selenium hub and connect various drivers to it for different browsers. These drivers can be on different machines and platforms so you can fully test different configurations