Selenium Grid Tutorial for Beginner-Selenium Grid with Chrome Browser - Part 2
Vložit
- čas přidán 1. 01. 2018
- Selenium Grid Tutorial for Beginner-Selenium Grid with Chrome Browser:
Learn:
+How to setup Hub and different nodes
+What is chromeoptions class
+How to launch Chrome using Grid
Selenium Grid Architecture:
Selenium Grid has a Hub and Node Architecture.
The Hub:
The hub is the central point where you load your tests into.
There should only be one hub in a grid.
The Nodes:
Nodes are the Selenium instances that will execute the tests that you loaded on the hub.
~~~ for HUB, use this command:
java -jar selenium-server-standalone-3.8.1.jar -role hub
~~~ for Node, use this command:
java -Dwebdriver.chrome.driver="/Users/NaveenKhunteta/Downloads/chromedriver" -jar selenium-server-standalone-3.8.1.jar -role node -hub 192.168.0.102:4444/grid/register
===================================== Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
czcams.com/users/Naveen%20Au...
Follow me on my Facebook Page:
/ naveenqtpexpert
Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
t.me/joinchat/COJqZUPB02r5sB7...
Paid courses (Recorded) videos:
Java & Selenium Course: www.naveenautomationlabs.com/p...
API Course: www.naveenautomationlabs.com/p... ➡️Get Our Courses✔️
📗 Get My Paid Courses at
Paid courses (Recorded) videos:
Java & Selenium Course: www.naveenautomationlabs.com/p...
API Course: www.naveenautomationlabs.com/p...
-------------------------------
✔️SOCIAL NETWORKS
Facebook: / naveenqtpexpert
Twitter: / naveenkhunteta
Blog: www.naveenautomationlabs.com
--------------------------------
Support My Channel✔️Or Buy Me A Coffee
Paypal: paypal.me/naveenkhunteta
Google Pay: naveenanimation20@gmail.com
--------------------------------
✔️Thanks for watching!
देखने के लिए धन्यवाद
Благодаря за гледането
感谢您观看
Merci d'avoir regardé
Grazie per la visione
Gracias por ver
شكرا للمشاهدة - Věda a technologie
You are best Naveen!!! .. I wanted to run my scripts on Selenium grid and tried many sites but none of the techniques worked ... I saw ur video and tried the same and it worked ... hats off to you .. Thanks a lot .. and you were right i was passing capability instead of option and it was falling .. only with options it worked
Thanks for watching. Keep learning
Thanks Naveen! It is very detailed and clear when you explain! Apreciate it!
Wow, every video has good and systematic explanation of every topic.
Thanks for all the efforts!! Will surely try this!!
your channel is best among all the selenium tutorial channels available on youtube . waiting for 3rd part on Selenium Grid
Smooth as always
A lot of homework is required to produce such video
Appreciate!!
+1
Explained from dead basics as Naveen style. Thanks a lot Guru. Waiting for the next sessions on Grid...
Eagerly waiting for 3rd part SirJi :) Big Thanks !!!
Thanks so much Naveen for all your videos . I really learned a lot from you. Your efforts are much appreciated !!
Thanks for watching
Hello Sir🙂 I have just watched your selenium grid videos. Although the grid and desired capabilities commands are updated but it was very helpful. Thank You. You are doing a great thing👍
It is awesome, anyone can understand Grid concept from this video
Awesome, Thanks a lot Naveen for such a nice explanation, eagerly waiting for the 3rd part
I started to like your video first and then watching it :-) ..Thank you naveen
your videos are damn helpful
Hi Naveen, This really the best session. lots of information about selenium grid. Waiting for next one.
Great Explanation Sir. We really appreciate your efforts.
you are awesome. the way you explain the things, that make us easy to understand.
Hi Naveen....Hats off to ur teaching skills...everything steps u explain is so clear and look very easy after your explanation....waiting for third series of Selenium grid..please post it soon....once again thnx alot for helping us in such an amazing way...
Thanks Naveen for your valuable time. Please upload few more videos on Grid to work on real time scenarios in projects.
Thanks for the Video, you are highly talented, all the concepts you explain are crisp clear.
Thanks for watching Mounika!
Good Video Friend
I looked for many videos and none of them explain in detail like you, thank you very much
I really don't know how to thank you...Thank you soooooo... much!
simple & clear. Plz conti adding videos. Thanks.
Nice explanation on Selenium Grid..It's really really helpful..
Thank you naveen Bhai this was really helpful
Hi Naveen, One of the best tutorial available in you tube. Awesome Teaching Skills.
waiting for 3rd part on Selenium Grid
Very well explained... Thanks Naveen...
Hi sir, very good video. I got a clear understanding about selenium Grid
Hi Naveen,
Great explanation as always (Y)
Please upload some more videos on selenium grid.
omg i just love ur videos..so helpful.. a BIG thanks to u
Thanks for watching Trisha
Hi Naveen...You always provide awesome videos...awesome content...Thank you very much.
Please share more selenium grid videos...For how to launch firefox, edge and then all of them combined using different nodes. Really appreciate your efforts.
good job Naveen. very well explained.
Thanks for video naveen , please upload more videos by using multiple node with different browser .
Thanks a lot Naveen.No words after seeing this video.. you are amazing.... Waiting for some more videos on Grid concepts...
Hi please share your selenium grid configuration
Eagerly Waiting 3rd part mr naveen
Thanks Sir.Very nice video
Awesome explanation. thx
Simply sooperb
Thank you Naveen..!
Hi Naveen waiting for more videos on Grid, please add, thank you for help
Amazing bruv, very nicely explained, though my Node setup was playing a bit in cmd prompt, hub was ready to use, node was acting, have to dig deeper on why, but thank you for this amazing video.
you are best bro!
awesome sirr..
superb bro
Thanks Navin - Appreciate your efforts!
i have one question.
When i run the program - and try to look at the logs in node command prompt - i cannot see the API calls.Yes but selenium shows me proper page title.
Hi Naveen, thanks for the video. It was wonderful
Can you please explain how parallel execution is done using Selenium Grid. Though you dont have any VM, it would be enough to just explain the code.
Also on how to use the parallel parameter in testng.
Hello Naveen,
Thanks a lot for your great video. I could start a Selenium Grid based test in no time after watching part 1 and part 2 of your videos.
I observed a problem with the Hub and Node being able to help start a session (when running on the same PC), if the Firewall on the PC is on.
The IP address in the URL was not getting resolved (i.e., the IP address of the PC where the hub and node are running), and hence a session was not getting started with the Hub.
When I turned of the Firewall, the Selenium based script was able to make a connection (session) with the Hub.
Hi Naveen, Please do a tutorial how to setup selenium grid with dockers
Sir, let say I want to run my Test cases on any Specific nodes(let suppose 2 nodes having specific address) then in that case how can I mention String nodeURL=??? Please tell !!!
Hi Naveen, Can you please explain how we can perform file uploads in selenium grid? If I have some files in my hub which I need to upload in node machines then how can this be achieved? Also if the file upload is done using AutoIt then what is the procedure?
Hi Naveen, If i want run in parallel on different browsers how to to add options? In your example you shown to execute for chrome. At the same time to execute in Firefox along with chrome also does it possible?
Hi Naveen, thanks very much for such detailed videos!! are there anymore videos in Selenium Grid series?
I know how to start up a HUB, create a HUB-node relationship, and also execute the script and see tests running on a different VM altogether.
My problem is:
I already have a test suite in place(I have used your videos to create it also, so there are page classes, corresponding test classes which extend to test base class)
Now I am not sure how to integrate the Selenium Grid knowledge with the test suite that I already have. Any inputs here will be very useful. Please point me the right direction.
Appreciate all you do! and thanks!!!
Hi Navin, You are really doing a very good job sharing the immense knowledge you have in automation. On this session I have one query..I could not understand how to run test on FF,Chrome(multiple Browsers) at the same time, since we are binding the remote web driver with only one DesiredCapability at a time. It seems we have to change the desiredcapability manualy to run the test execution for different browser? Pls answer .
Yes I do have same question
Hi
I practice on it , its not working with firefox ,its working with only chrome,
while working with firefox i got diff exception such as webdriver exp, sessionnotcreated exp.
i tried so many time but i am not able to launch the firefox browser.
i am using webdriver 3.14, firefox 64, geckodriver v19 or v23.
I tried so many time but i am not able to launch the firefox.
plz give the solution
Hi Naveen what is the use of 4444 port.
I am using selenium grid in Jenkins (linux) I am new to Jenkins please help me.
Hi Naveen, i want to schedule my selenium grid project into jenkins. Please help on how to achieve this. Please create a video for this. On how to execute (create node/hub) through jenkins.
Do we need to setup the chrome options even if we are running TCs on Firefox
Hi Naveen can we get one session for Selenium 4 grid? In selenium 4 I found this configuration can be done by standalone server itself, and hub node configuration is not as same as this, it will be a great help in case you provide the setup details
Hi naveen,while running my program it does not do anything in eclipse..node and hub is up and running..what can be the reason?
Hello Sir..the no of browsers which were shown on node while you did refresh were 5 ff 5 chrome and 1 safari..so if we want to work on internet explorer is it possible with selenium grid
sir
when i took that ip address and used to open it in chrome or any thing i cant able to access the console .only i got timeout msg
Hi sir, In selenium Grid there is Chrome options for executing the code in chrome browser. Is there any separate options for all the browsers to execute the code in other browsers?
Hi Naveen, Just wanted to understand last part. So you mean to say Hub and Node should have same network in order to work? Please confirm
Hi Naveen,
I have doubt is that if we want run my tc in 2 chrome, 2 firefox and 1 IE Browsers in two different nodes how we can do that??
you can use the config file while launching the node it will create the instance and in the test cases you can define the capabiliies
hi naveen On running command for node i am getting following error
Unable to access jarfile selenium-server-standalone-3.8.1.jar
please help
How to integrate selenium grid with existing framework, considering we need to divide set of TCs in differnt VMs ( Do we need to add Desire capabilities in each class file?)
Hello Naveen, I'm trying to setup selenium grid 3.1.4, configuration is done, but while executing script got errors main(web driver) unable to parse desired capabilities...cld u plz guide, thank you.
I would like to know how to run on VMs using Selenium Grid.
can we use the maven dependencies too??
for people looking for selenium grid + python use this code :
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
url = "127.0.0.1:4444/wd/hub"
cap = DesiredCapabilities.CHROME
driver = webdriver.Remote(command_executor=url, desired_capabilities=cap)
driver.get("google.com")
Error: Could not find or load main class selenium-server-standalone-3.12.0.jar this my error
When i run the program, I am getting this error.
org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Hey Neha , did you find solution for this error . I tried multiple things but nothing worked out .Thanks In advance
Hi Naveen, I am using 3.141.59 and following your same steps. But not getting the merge. options.merge(); please advise
sir,
my connection not getting .it says too long time to connect
please share the link of 3rd video of grid @Naveen
Getting this issue - "Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: No matching capabilities found"
have you got any solution for this? cause I'm getting the same error
same error , please do share an update in case you have got the resolution
@@dineshkumaar2117 try this one; cap.setPlatform(Platform.WINDOWS);
@@neenusamuel6819 it works, thank you
Okay.
Hi Naveen, what is that command below for?
java -Dwebdriver.chrome.driver= ?
Hi Naveen,
am getting this error, please help
[RemoteTestNG] detected TestNG version 6.13.1
FAILED: gridChromeTest
org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Build info: version: '3.9.0', revision: '698b3178f0', time: '2018-02-05T14:56:13.134Z'
System info: host: 'ZEESHAN-PC', ip: '192.168.1.128', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161'
Driver info: driver.version: unknown
Command duration or timeout: 465 milliseconds
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:155)
at grid_tests.ChromeGridTests.gridChromeTest(ChromeGridTests.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:571)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:707)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:979)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:505)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
at org.testng.SuiteRunner.run(SuiteRunner.java:364)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1116)
at org.testng.TestNG.runSuites(TestNG.java:1028)
at org.testng.TestNG.run(TestNG.java:996)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Build info: version: '3.9.0', revision: '698b3178f0', time: '2018-02-05T14:56:13.134Z'
System info: host: 'ZEESHAN-PC', ip: '192.168.1.128', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161'
Driver info: driver.version: unknown
Build info: version: '3.9.0', revision: '698b3178f0', time: '2018-02-05T14:26:55.441Z'
System info: host: 'ZEESHAN-PC', ip: '192.168.1.128', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161'
Driver info: driver.version: unknown
at org.openqa.selenium.remote.server.ServicedSession$Factory.lambda$get$0(ServicedSession.java:128)
at org.openqa.selenium.remote.server.ServicedSession$Factory.apply(ServicedSession.java:145)
at org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12(ActiveSessionFactory.java:176)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$11$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.server.ActiveSessionFactory.apply(ActiveSessionFactory.java:179)
at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2(NewSessionPipeline.java:65)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.util.Collections$2.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$3(NewSessionPipeline.java:68)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.stream.DistinctOps$1$2.accept(Unknown Source)
at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Unknown Source)
at java.util.stream.Streams$ConcatSpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession(NewSessionPipeline.java:71)
at org.openqa.selenium.remote.server.commandhandler.BeginSession.execute(BeginSession.java:65)
at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:242)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
===============================================
Default test
Tests run: 1, Failures: 1, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 1, Failures: 1, Skips: 0
===============================================
@@abdulnawas have you got any solution for this? cause I'm getting the same error
How can you do in selenium with Python?
Hi Naveen, Thank you for this valuable and awesome video. I tried this and the session is not opening it got stuck at the below console logs. Could you please suggest me solution for this.
Oct 22, 2018 10:32:52 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
Need to check it on your laptop
Also one more thing i am using Eclipse Neon3 selenium 3.12.0 version, i didn't get merge attribute, can you please tell why it did not came.
I want to use selenium grid with python, help me with how I can setup and run it.
Getting error Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
Kindly help
have you got any solution for this? cause I'm getting the same error
i am getting this exception
org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Hey Nilam , did you find solution for this error . I tried multiple things but nothing worked out .Thanks In advance
chrome driver path is not correct
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
I'm getting this error anyone please help
Same error
Chrome Driver path is not set correctly
where is the 3rd part of Selenium GRID
It is easier to configure the selenium grid in your system now with the help of talongrid - github.com/frostyaxe/Talongrid
- Couldn't register this node: The hub is down or not responding: Connect to 192.168.0.102:4444 [/192.168.0.102] failed: Connection refused (Connection refused)
U have closed hub command window. DO nOT CLOSE HUB WINDOW
u have to give ur ip address
Hello Guys, Did any one try selenium grid through VPN ?
EA w