Anyone Else Having Trouble Registering Ghostdriver with Selenium Grid? - selenium-webdriver

I know that there is documentation on the ghostdriver wiki on how to attach it to a selenium grid. For those that don't know you can find it here
I've compiled the special phantomjs twice, tried to attach it to selenium servers local, and remote using both Selenium versions 2.24 and 2.25 to no avail. It starts up Ghostdriver locally just like you expect, but there's certainly no registering going on.
I tried both ip/localhost:4444 and ip/localhost:4444/grid/register with no results. I also thought perhaps it just didn't show up on the grid console and tried to run tests against it anyway, which failed stating there was nothing populating the grid.
I've tried this on both CentOS 6 and Ubuntu 12.04 with no luck.
I'm out of ideas. Has anyone else had problems like this?

I had exactly the same problem and fixed it with using the lastest version of selenium-grid.
The good website: https://code.google.com/p/selenium/wiki/Grid2 (this is no longer http://selenium-grid.seleniumhq.org/).
Here the steps (version 2.31.0):
Download the selenium-server:
wget https://selenium.googlecode.com/files/selenium-server-standalone-2.31.0.jar
Launch selenium grid server:
java -jar selenium-server-standalone-2.31.0.jar -role hub
In a new terminal, launch GhostDriver:
phantomjs --webdriver=5555 --webdriver-selenium-grid-hub=http://localhost:4444
Check out available remote control on http://localhost:4444/grid/console.
You should see something like that:
listening on http://127.0.0.1:5555
test session time out after 300 sec.
Supports up to 1 concurrent tests from:
phantomjs
I was testing this commands on CentOS 6.3, I hope it works for you!

Related

Unreal Engine 4.24: Plugin 'AndroidPermission' failed to load because module 'AndroidPermission' could not found

I am preparing a project about self-driving vehicles and I will work on the Carla simulator. I am using Ubuntu 18.04 LTS and installed Unreal Engine version 4.24. I've done the steps in the Carla document one by one, but when running the UE4Editor, I get the AndroidPermission not found error. Even though I disabled this on the uplugin file of it, still the same problem persists. How can I solve this problem? Please help me.
Are you trying to run the Unreal Editor? Or are you calling make launch to start CARLA?
In the first case, set "EnabledByDefault": false and "Installed": true in /Engine/Plugins/Runtime/AndroidPermission/AndroidPermission.uplugin. I assume that the Installed attribute is set to False on your end.
In the second case, try to start CARLA in Visual Studio Code by selecting the launch configuration CarlaUE4Editor(Development). For this you need to open the workspace inside /Unreal/CarlaUE4/CarlaUE4.code-workspace.
You also need to set "EnabledByDefault": false on /Engine/Plugins/Online/Android/OnlineSubsystemGooglePlay/OnlineSubsystemGooglePlay.uplugin because the plugin OnlineSubsystemGooglePlay requires AndroidPermission.

OperaDriver for Selenium remains stuck when launching tests

I am using TestNG to run automated tests using a Selenium Java client. The tests are running fine on chrome and firefox but when I try to run the same on opera, I end up seeing tests timing out on the following console message:
Starting OperaDriver 2.35 (ee0117ea0f7f76009fd2aa3dd6b6164205de32b5) on port 27234
Only local connections are allowed.
org.openqa.selenium.WebDriverException:
unknown error: Opera failed to start: exited abnormally
(Driver info: OperaDriver=2.35 (ee0117ea0f7f76009fd2aa3dd6b6164205de32b5),platform=Linux 4.13.0-38-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Environment
Ubuntu 16.04LTS
JDK 10
Selenium 3.11.0
OperaDriver 2.35(downloaded from here)
Code
OperaOptions options = new OperaOptions();
options.setBinary("operadriver");
testDriver = new OperaDriver(options);
I am trying to understand what went wrong here.
Many in the community seem to get the same error when trying to get opera running with selenium and opera driver. I also tested this with your versions and get the same output, although the other browsers are working just fine.
Opera does not seem to put a lot of resources in making this work. Check out this link for some more information, it is actually a slightly different issue, but still there are some background informations there.
The suggested hack is to run opera through an appropriate version of the chromedriver. I also got opera running with selenium that way some time ago (therefore other versions), but I did not yet test this with your configuration.
Update
I managed to get the following configuration work:
Ubuntu 16.04
Java 1.8
Selenium 3.11.0
Operadriver 2.30
Opera 48.0.2685.52
by using the chrome hack and passing the operadriver as the "chrome"driver

WebDriverException... moveto did not match a known command

When the Mouse Over Keyword is called I get the following error :
WebDriverException: Message :POST /session/bcb99bc5-1b47-4438-b1b7-471785ea34c8/moveto did not match a known command on Mozilla FireFox(geckodriver)
Sadly this appears to be a bug in the Mozilla/geckodriver side of the Actions implementation that has been lingering since mid 2016. If you really need this, switch to something not Firefox or grab a pre-geckodriver Firefox (47 or below, I believe) and use the older webdriver bindings (i.e., Selenium 2). Unfortunately, it is not as easy as just getting the older FF version.
See :
[Bugzilla bug report][1]
[Gecko bug report][2]
https://bugzilla.mozilla.org/show_bug.cgi?id=1292178
https://github.com/mozilla/geckodriver/issues/159
**Question:**WebDriverException: Message :POST /session/bcb99bc5-1b47-4438-b1b7-471785ea34c8/moveto did not match a known command on Mozilla FireFox(geckodriver)
**Answer:**Selenium web driver should be updated version and Firefox latest version will not supports the old selenium web driver,Firefox version should be 49.0 and selenium web driver version should be 3.0,then that issue will not come while executing the script.

PhantomJS register with Selenium Grid

I need assistance on registering PhantomJS with Selenium Grid. Based on some approaches I've seen online I implemented it this way:
Grid register
java -jar selenium-server-standalone-3.0.0-beta2.jar -role hub -port 4444
PhantomJS
phantomjs.exe --webdriver=5555--webdriver-selenium-grid-hub=http://127.0.0.1:4444
both cmd started fine but phantomjs is not registered to the grid
As far as I know, you don't need Selenium to run the test against phantomjs in webdriver mode.
I don't know wich language and framework are you using. But In behat/mink/phantomjs:
Console:
phantomjs --webdriver=8643
And in your behat.yml:
sessions:
"Name_of _your_session":
selenium2:
wd_host: "http://localhost:8643/wd/hub"
The important part here is: wd_host: "http://localhost:8643/wd/hub"
That I'm sure that you can adapt to whatever your system is. You can run the phantomjs from another server and use it only by modifying the IP: "http://XXX.XXX.XXX.XXX:8643/wd/hub"
But you don't need to run the selenium server.

End To End Testing on Headless Server

I am trying to set up an environment for end-to-end testing on a droplet running Ubuntu server 12.04.3 on digital ocean.
What I am trying to achieve in the end is for my jenkins (installed on the one droplet) to be able to run my end-to-end tests. Now, the server is ofcourse headless and the end-to-end tests need to run through a browser (I am using protractor with the selenium standalone server with chromedriver).
My question is: how do I spawn a browser on that machine? I have installed xorg and if I do startx on the server, log out and ssh -X to it, I can manually run the end-to-end tests (a browser pops up on my local machine). But I can get it to work without ssh -X to it, and since jenkins is on the same droplet where the tests are to be run. Well I dont get a browser to spawn.
NOTE: I know I might be missing something really trivial here since I don't fully understand the configuration nor the xorg.
Any hints or a complete answer is very much appreciated, this is giving me gray hair.
Edit: After a little digging I think i got the xorg stuff a bit wrong, i am guessing the purpose of X is to be able to spawn a window on a remote machine ( ie my local machine). And what i am after is more along the lines of a virtual frame buffer such as Xvfb...
There is PhantomJS but with Protractor is buggy and a dead-end.
You can still use Chrome & Firefox headless through docker-selenium or, if you don't like Docker you can do it yourself with ubuntu-headless sample. Both solutions provide Chrome & Firefox by using Xvfb even though there is no real DISPLAY.
UPDATE 2 Seems to be possible to run Xvfb in OSX: http://xquartz.macosforge.org/landing/
UPDATE 1 Mac OSX selenium headless solution:
Enable multi-user remote desktop access to OSX machine
So can test selenium headless on mac. Not headless really but as another user so it doesn't interfere with your current user display.
To do this you need kickstart: http://support.apple.com/en-us/HT201710
Begin using the kickstart utility
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent
Activate Remote Desktop Sharing, enable access privileges for all users and restart ARD Agent:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all
Apple Remote Desktop 3.2 or later only
Allow access for all users and give all users full access
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Kickstart help command
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -help
A lot of angular apps use Travis CI to perform Protractor based end-to-end integration tests on headless vms all the time. I do not know the details of exactly how they do it but I do know that they use a linux service called xvfb which is a headless x windows implementation. Looking at a typical Travis configuration file, it appears that all they do before firing up their web server, selenium server and kicking off Protractor is to call sh -e /etc/init.d/xvfb start to start this service.

Resources