Can i use selenium mesh on one machine

I don't have multiple machines at my job. I have one window and one mac to execute the script. I was wondering if I could use a selenium grid to execute a script on a single machine. I have never used selenium mesh. Any article, links or suggestions are highly appreciated.

+3


source to share


4 answers


Yes, you can run selenium edge with multiple nodes on the same machine, but the RAM must be at least 8 GB because it will run test packages with more than 4 browser instances, which requires more RAM if the browser is not closed. http://selenium-release.storage.googleapis.com/index.html Download the offline jar.

java -jar selenium-server-standalone-2.45.0.jar -role hub 

      

It will start the hub.

To start nodes open another cmd and enter the following command to start "n" number of nodes. java -jar lib / selenium-server-standalone-2.43.1.jar -role node -hub http: // localhost: 4444 / grid / register -port 5555

java -jar lib / selenium-server-standalone-2.43.1.jar -role node -hub http: // localhost: 4444 / grid / register -port 6666

java -jar lib / selenium-server-standalone-2.43.1.jar -role node -hub http: // localhost: 4444 / grid / register -port 7777



If you want to run the same test case in a different browser, download the browser drivers from [ https://code.google.com/p/selenium/wiki/ChromeDriver]

[ https://code.google.com/p/selenium/downloads/detail?name=IEDriverServer_Win32_2.39.0.zip&can=1&q=]

Run the following command to launch different browsers: for example:

java -jar selenium-server-standalone-2.45.0.jar -role webdriver -hub http: // localhost: 4444 / grid / register -Dwebdriver.chrome.driver = C: \ Users \ xug \ Desktop \ chromedriver.exe

java -jar selenium-server-standalone-2.45.0.jar -role webdriver -hub http://localhost:4444/grid/register -port 6666 -Dwebdriver.chrome.driver=C:\Users\xyz\Desktop\chromedriver.exe.

      

This will launch the Chrome browser and node.

+4


source


Yes, you can use Selenium Grid on one machine. You can download the jar file from this download link

Once downloaded, start the hub with the following command:

java -jar selenium-server-standalone-2.46.0.jar -role hub

      

Then, register the nodes in it with the following command:



java -jar selenium-server-standalone-2.46.0.jar -role node -hub http://localhost:4444/grid/register

      

For more information see the following link: example for a single machine scenario with Ruby, but it is similar to java.

http://elementalselenium.com/tips/52-grid

+3


source


You can also run the mesh locally using Docker. Selenium provides images for Hub, Chrome and Firefox on Ubuntu.

0


source


You can, but you don't know why you should. If you want to run on the same machine, you can simply run multiple instances of the web driver for different browsers and achieve that. IMHO the whole purpose of the grid is to distribute the load between nodes with different browsers, OS, etc.

But to answer your question, yes you can. You can run hub and node on the same machine and check it out if that's what you want to do.

0


source







All Articles