Managing selenium grids/nodes - selenium-grid

Currently we are running the selenium grid on a Windows 7 vm and we have about 10 other win 7 vms for the nodes. We periodically run into some problems where the node stops working and just needs to be restarted. We also would like a periodic restart. I am curious how others are managing/ monitoring the nodes to see when something fails. Not sure if there is a way to monitor with something like Nagios?
I thought for restarting that I could try to build the node jar as a reservice and just have a schedule to reboot it once a month. Thoughts? Do I need to elaborate some more? Thanks

You can try selenium-grid-extras. Its been open sourced by groupon, I believe. From their git hub page:
This project is designed to help you manage your Selenium Grid installation by giving you control over the Grid Hub machine and Grid Node machine. This is very useful in cases when Internet Explorer Driver crashes, and you need to kill the iedriver.exe so that next test can start and not fail.
Link to the page - https://github.com/groupon/Selenium-Grid-Extras

Related

How does appium and selenium grid function together

So I have tested an appium script and it's running fine but I want to run it with selenium grid so I can run this on a different machine but I am not clear on if I need to keep the hub machine always active or it can be powered off after a certain while or if I can make another hub on my node machine. If an alternative means is possible for achieving this can I know too? Thank you.

Blue Prism - Not able to spy elements - Browser Firefox

I have an issue with spy Browser mode in Firefox.
I have designed a new RPA process on Dev machine where I have spy in Browser mode (in firefox) web page.
On my Dev machine the Browser mode is working good and the process runs very good.
The issue is on production machine where the modeler don't see the elements which have been spied on dev machine.
Actions so far done.
We have set all settings regarding Firefox to the same like on dev machine using the BP guide,
We have installed the same Firefox extension on prod like on dev machine.
We have set the same internet options.
Non of the actions have helped us to be able to spy elements in Firefox on prod machine.
My questions to the experts community:)
What else could have impact on the BP - Browser mode which is stopping BP to see elements?
What virtual machine settings need to be set/or what to check?
We have BP Version 6:
Application Manager 6.4.2.10610
.Net Framework 4.7
Firefox version 72.0.2
Blue Prism Browser Extension version 6.4.2.10610vycoxormiz (updated 30. Jan. 2020)
Thank you for your help!
I found the solution.
During investigation I came on this link
[https://superuser.com/questions/719875/google-chrome-always-says-google-chrome-was-not-shut-down-properly][1]
In the location "%UserProfile%\AppData\Local\Google\Chrome\User Data\Default\Preferences
I have changed the "exit_type": "normal" to "exit_type": "standard" and immediate the
Browser mode on production machine was working and we could run the process.
It seems that the chrome when it wasn't shut down properly has impact on Blue Prism.
Adding update.
I have noticed that each time Chrome opens it changes in the Preferences file the status to Normal.
I have fixed the issue in that way, that I have added additional logic to my solution:
1. I have copied the Preferences file to a different location and changed in the file the status to Standard.
2. I have added additional logic to my process where bot copy the file from the new location and replace the file in the Chrome location each time he runs.
Hope this will help others with similar issue.
Regards!

Jenkins setup for running Selenium test on Ubuntu

I already tried a lot for Jenkins setup on Ubuntu for running selenium test cases. But each time i face problem Like Display error , chrome connection timeout. I tried all the solution on internet (debugging this from last one week). Someone please help in setting up by step by step process (including version compatibility).
Also, test-cases on Ubuntu Jenkins run only on display mode?

How to setup webdiver to perform actions in background?

I am currently working in Automation QA. Our project using Java: jbehave, thucydides, selenium. We are working in Ubuntu OS.
Every time I run my tests, I have to stop doing everything(coding, browsing the web), because every click or any action of selenium is taking driver window(we are using chrome driver) in focus(makes window active) and if i do something i mess up the test. Our team is wasting a lot of time because of this.
We have tried Phantomjs, it doesn't work correctly, cannot find elements etc... And also to run tests in virtual machine using vagrant isn't working for us(for company specific reasons).
It is fine if Chrome driver will take over active window when it starts, as long as it would continue performing different actions in background. Strange, but in my previous project(windows, c#, mstest) chromedriver would behave exactly like this without any additional setup.
Please help, I know few other teams having this issue. Seems like this issue only on Mac and linux.
After having this issue for a long time I have finally found a good solution. This issue still remains on ChromeDriver level, so if there are any updates on this side let me know.
The easiest way to run tests in Ubuntu in a background is using VNC Server. Here are the steps you should follow:
Install vnc server from ubuntu terminal:
sudo apt-get install vnc4server
Start server with any number(I use 7). First time doing it enter password for vnc server(Remember it!).
vncserver :7
To start server in full screen add "geometry" to last command with your screen resolution for example:
vncserver :7 -geometry 1920x1080
Download some VNC Viewer. I use Real VNC.
Go to Real vnc viewer, start new connection and enter:
VNC Server: localhost:7
Encryption: Let VNC Server choose
Press connect and enter your vnc server password(the one from step 2).
New window should be opened, open new terminal in it.
Run your test from terminal. I use java maven project so for me it works like this. Navigate to project folder and run: mvn clean install
If you want simply to run test in hidden mode using only terminal(without opening vncviewer) use this command:
cd path/to/project
xterm -display localhost:7 -e mvn clean install
If you want to stop server:
vncserver -kill :7
Hope this will help many of you.
For me (I had the same problem in my Grails project's functional test using Chrome; not with Firefox) works this set up:
ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized --disable-popup-blocking");
new ChromeDriver(options);
Regards

Possible to register Selenium RC's with the Hudson Selenium Grid Hub w/o the RC's being slaves in the Hudson cluster?

I am trying to get Hudson to run my ruby based selenium tests. I have installed the Selenium Grid plugin, but I don't want to have the RC's running as slaves in a Hudson cluster. The reason for this is I don't want to waste the next six years of my life trying to configure each of my projects in various Windows environments.
Hudson currently pulls each project from Github and builds it just fine. With a regular Selenium Grid setup, I am able to edit the grid_configuration.yml file to represent the various environments I wish to tests against, then pass environment variables to the rake task that runs the test i.e. which browser/platfom to run on and the URL of the application under test -- usually a port on the hub machine running in a specific environment.
In this way, the machines on which the RC's run don't need to know anything about the source code of my apps, they just need to have selenium-grid installed and have registered with the hub.
Is there a way of elegantly emulating this with Hudson?
do you have a concept of build agents, I do not know much about Hudson. We are using Anthill Pro at work and we have set up an Ahtill Pro agent. The source code is downloaded to the agent and the agent is responsible to run the maven goal for running the tests. It works pretty well for us as the RC machines are not part of the build environment. the tests are responsible to talk to Selenium HUB and get new sessions and do the testing.
I hope this helps.
Cheers
Haroon
I chose to not use the plugin in order to take advantage of the newer Grid version. I cloned a few VMs with a startup script that runs ant launch-remote-control from a shared drive that they can all access. Hudson doesn't have, and doesn't need any access to the Grid nodes and they aren't slaves to Hudson. I altered my Hudson server to launch the hub on machine startup. This setup allows me to run the grid normally with or without Hudson.