"Selenium server standalone" jar vs "selenium java" jar - webdriver

I am bit confused here..
"selenium-server-standalone" jar contains all the library files to run script then why do we need to use "selenium-java" jars?
I read somewhere that its used for Language Binding.. if it is true, then please help me to understand the meaning of Language binding as well.
Thanks.

In the previous version of Selenium, which is Selenium RC (Remote Control), it is mandatory that you need to run selenium-server-standalone.jar jar file, which acts like a server. Selenium RC will then use this server to establish a communication channel between browser and the code. Also, this jar file contains all the library functions to be used in our code.
But in later version of Selenium, which is Selenium WebDriver, there is no need to run this jar file, as the WebDriver api will directly communicate with the browser's native language. So, this jar file is replaced with selenium-java.jar jar files
Hope this helps.

It is mainly use in the Selenium Grid. As we use different OS and browsers with different machines, we need to run it same time for various reason. In selenium Grid, we use the machine Hub and Node(You can go through selenium grid docs for more), so for running the selenium in different machines with the main machine, we need server standalone.

WebDriver and the Selenium-Server
You may, or may not, need the Selenium Server, depending on how you intend to use Selenium-WebDriver. If your browser and tests will all run on the same machine, and your tests only use the WebDriver API, then you do not need to run the Selenium-Server; WebDriver will run the browser directly.
There are some reasons though to use the Selenium-Server with Selenium-WebDriver.
You are using Selenium-Grid to distribute your tests over multiple machines or virtual machines (VMs).
You want to connect to a remote machine that has a particular browser version that is not on your current machine.
You are not using the Java bindings (i.e. Python, C#, or Ruby) and would like to use HtmlUnit Driver
http://www.seleniumhq.org/docs/03_webdriver.jsp#how-does-webdriver-drive-the-browser-compared-to-selenium-rc

Related

Qt application running with `-platform offscreen` argument cannot establish websocket connection

I have a GUI application which contains a websocket server QWebSocketServer. I also have a python script which sends messages and the application processes them. Everything works well. During testing I wanted to run the application in headless mode using -platform offscreen command line argument added to the app executable name (I changed nothing else). But the problem is that when the application runs off-screen, the client script cannot establish connection with the web socket server. I tested this on localhost only. I do not understand how this two things, visibility of GUI and websockets, can interfere. Any ideas what could go wrong?
Note: I am using Qt 5.11.1 64-bit with VS 2017 on Windows 10 Pro.
A platform plugin is a bit more than merely "GUI". The -platform option selects a family of platform-specific plugins. Perhaps some plugins that make networking work are absent on that platform spec. That's very likely, since the offscreen platform is only a proof-of-concept: it's to show how you'd write a platform plugin. It's example code, and it does the bare minimum needed. It's nothing that you should be using for production without fully understanding what's there and how it works - it wasn't not meant for it, at least not the last time I looked at it. It shouldn't be hard to make it work, but you'd need to clone the source and start hacking on it.

Web Automation that can also run Unix Commands

Does anyone know of web automation software/app that also can run unix scripts? I know of the standard ones, but can't find out whether I can also run Unix scripts.
It's pretty common to multitask like that inside of Selenium WebDriver automation code.
For example, you could write a Selenium test in Python that also launches arbitrary external programs/scripts via Python's built-in support for executing commands.

OpenCL development platform?

I am developing OpenCL code on a linux cluster through SSH -
are there any tools that would make this process easier, i.e.
something like NVIDIA Parallel Nsight for OpenCL ?
No there is no such tool, though you might try developing your code using ordinary computer and post production versions there..
If the computer where you perform development is also running Linux, you can easily mount a remote folder as local. In a Gnome environment, open Nautilus (the file manager), click File => Connect to server, chose SSH, fill the required parameters, and you have a remote folder as local.
You can then use any IDE you want to develop code, and maybe perform simple runs, tests and debugs if the OpenCL tools (compiler, debugger) you're using remotely are also installed locally. However, To compile and properly run the code on the cluster, you need to use the ssh client on the command line.

Moving a Java JAR file to a new machine

I have a Java program that connects to com ports when it's running. All I have is a .JAR file. I recently attempted to move this from a machine that the program runs on to another machine. I know the serial devices work on the new machine because I can interact with them thru a program called Putty. When I execute the .JAR file it comes up and seems to run just fine, but is unable to connect to the com port. Could this be a missing library that is installed in the JRE of the other machine? How would I figure out what is missing to make this program run?
Yes that could very well be the problem. Legacy ports (parallel and serial port) support in Java is provided by the Java Communications API, which relies on native code to support low level access to those ports. That API it's an extension to the JDK and not part of it.
Of course it could also be that on the new machine the user running your program doesn't have permissions to access the port, which is a different problem.
EDIT: For cross platform support for legacy ports, hell even if you only intend to use your program in one platform I recommend RXTX, an open source replacement for JavaComm.
Open the jar, look at META-INF/MANIFEST.MF file to see if it specifies any jar dependencies.
If not, it is possible that the JAR is using some native libraries to connect to COM ports.
Using the Serial port with Java normally involves addition of a compiled native (.so or .dll) file to the LD_LIBRARY_PATH.
I think you're using Linux, so look out for a file called librxtxSerial.so on the original machine (it'd be called rxtxSerial.dll on Windows)
The library path can be set in a few ways, but your best bet is to check for this file within the original Java installation:
e.g. /jre/lib/i386/librxtxSerial.so
Another thing to look out for is the rxtx jar itself (this may have been bundled inside your jar, or maybe not).
You may get better results by simply following instructions on the RXTX website, but I'd try understanding the original installation first.
http://rxtx.qbang.org/wiki/index.php/Installation
Good luck!

Compiling Flex Projects with Remote Ant

I'm having problems compiling applications with remote ant, something similar to this. However the flex compiler seems to have problems with this. When I run the same script on my local compiles everything without any problems but when I try the remote ant it fails without giving more information.
Things to look for on the remote machine:
The paths in the build file need to be valid (I'm pretty sure the script file you use to build the project on your computer, will not be good on the remote one because of a possible difference in paths)
You need the Flex SDK installed
You need Java JDK installed
You might also need some environment variables set correctly (like JAVA_HOME)
ANT binaries on the remote machine (but I assume you already have this, probably coming with the system you're using)
The sources to be compiled, obviously (I assume you already have these too, probably gotten by your system from a repository)
Also I find it hard to believe it would fail without any error. There should be at least a log file somewhere to give you an idea of what went wrong.

Resources