Selenium Grid Tutorial for Beginner-Selenium Grid with Browser Stack (Cloud)

  Рет қаралды 101,178

Mukesh otwani

Mukesh otwani

Күн бұрын

Selenium Grid Tutorial for Beginner-In Automation we always have to take care of cross browser testing, parallel execution with different threads and remote execution of scripts.
In this video, we will discuss Selenium Grid 2.0 and how to configure node and hub.
We will also talk about how to integrate Selenium test on Cloud (Browser stack)
Code and theory updated on below article
learn-automatio...
Please Share, Support and Subscribe and let’s spread the knowledge
Main Website- learn-automatio...
KZbin - / mukeshotwani
Facebook Group- / 256655817858291
Facebook Page- / seleniumwebdrivermukesh
Google + - plus.google.co...
Twitter- / mukeshotwani
Instagram- / mukeshotwani
Check out my another blog
mynewsyourviews...
~-~~-~~~-~~-~
Please watch: "How To Create Maven build For Selenium Framework"
• How To Create Maven bu...
~-~~-~~~-~~-~

Пікірлер: 181
@rkn3383
@rkn3383 3 жыл бұрын
I am kind of addicted to your channel. Thanks for clear concepts.
@Mukeshotwani
@Mukeshotwani 3 жыл бұрын
So nice of you mate
@rkn3383
@rkn3383 3 жыл бұрын
For the first time I created grid and two nodes local machine node and remote node and also execute through hub and specific node. Thanks very much Mukesh.
@Mukeshotwani
@Mukeshotwani 3 жыл бұрын
Nice work! RK
@javeethnisarahamed7972
@javeethnisarahamed7972 5 жыл бұрын
Excellent Mukesh.. Instead of learning theoretically, this video explained lot of Grid concepts in a simple way. Thanks a lot for your support.
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Thanks Ahamed I am glad it helped you :)
@sethmiller688
@sethmiller688 7 жыл бұрын
Mukesh you are simply the best instructor on youtube by far
@vijayk8862
@vijayk8862 8 жыл бұрын
very well presented mukesh..!! actually u didnot leave any doubts behind..... good ones... thank you boss..!
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Thanks Vijay Hope you will implement the same in your project :)
@gavtivlogging1079
@gavtivlogging1079 5 жыл бұрын
one of the best tutorial till date. Looking forward for more videos like automation with python. Thankssssssssss
@kanteshgyanagoudra1724
@kanteshgyanagoudra1724 7 жыл бұрын
Hi, Mukesh Thank you for the good video very much helpful for beginners.
@stanlick62
@stanlick62 5 жыл бұрын
Hi Mukesh, This was an excellent introduction!
@saradatesting6354
@saradatesting6354 8 жыл бұрын
Hi Mr. Mukesh Thanks A Lot For Your Effort And This Video Very Helpful........Keep Going.......................
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Thanks Sarada :) Hope it will help
@jaytrivedi6243
@jaytrivedi6243 8 жыл бұрын
Hi Mukesh, Very well Structured and Executed Video. Thank you for it
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Hey Jay thank you . Keep watching.
@MohitSharma-fs1qz
@MohitSharma-fs1qz 6 жыл бұрын
Hi Mukesh, I'm trying to automate parallel testing using Selenium Grid. My question is - With 1 VM(Hub, in this case)can I connect it to different WiFi (Nodes, in this case) routed through different IP (each WiFi line has a specific IP)address and ports?
@sravanipasam6204
@sravanipasam6204 7 жыл бұрын
Nice info Mukesh, I want to execute my test in devices and desktop browsers at a time then how to set capabilities and do we need to mention any configurations in testng. Xml .first how to use it please help me
@arunab1624
@arunab1624 8 жыл бұрын
Hi Mukesh, your vedios are awesome and very very useful for me..thanks a lot
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
thank you Aruna :) I m glad you liked all.
@SauravKumar-xj4lm
@SauravKumar-xj4lm 7 жыл бұрын
I am trying to execute through maven project but i am getting this issue: No main manifest attribute can you please help me . Thanks in advance .
@SagarAjmire1
@SagarAjmire1 8 жыл бұрын
Hi Mukesh, In one of ur video u have associated only one jar of selenium (may be selenium-server.zip), instead of around 23 jars, which we get after extracting "selenium-java.zip". But I forgot which video it was in, as I have watched many of them. So how to decide which one to use and when? And also for Selenium Grid, u have used "selenium-standalone-server". So, are "selenium-standalone-server" and "selenium-server.zip" common for all languages like python, java, c#?
@fullstack101
@fullstack101 7 жыл бұрын
Awesome explanation!
@Hrudhitha10
@Hrudhitha10 5 жыл бұрын
nice bro. i learn new things from this video thank you so much :)
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Thanks buddy
@rajeshsingla335
@rajeshsingla335 7 жыл бұрын
Which cloud is best for usage? Do we have any comparison? Also, in any organization, automation would be run mainly on Staging/test envs. than running on production env. Any one would love to know the impact if any feature is going to break on different browsers on different platforms/versions before the release. How can we achieve it? Any thoughts?
@sonammittal3498
@sonammittal3498 6 жыл бұрын
Hi Mukesh, 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 selwnium grid commands (create node/hub) through jenkins.
@chethu30
@chethu30 7 жыл бұрын
Thank you so much Mukesh. It really helped me. Can you please give an example of executing multiple nodes where we can execute in two OS
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Mate, You can just create multiple nodes and rest hub will take care.
@anilkumarmaram6821
@anilkumarmaram6821 6 жыл бұрын
Hi Mukesh, Am getting below error while configuring standalone server and role hub in command prompt. Error- (port 4444 is busy, please choose a free port for the hub and specify it using -port option) .
@sumitkumar-os7cr
@sumitkumar-os7cr 6 жыл бұрын
Hi Mukesh I have followed same steps my node and hub is up and running .... but on console it keep saying sessionnotcreated exception: unable to create new remote session ... pls help
@kroe761
@kroe761 7 жыл бұрын
Hello Mukesh, great video! Thanks a Lot for the wonderful info. Do you know how to set up a selenium grid that runs the same test in parallel over multiple platforms at the same time? This can be either in BrowserStack or other machines, it doesn't matter. Can I run the sample google test on Chrome AND Firefox at the same time? Additionally, I see that the Selenium Grid Standalone Server is now on version 3.0. Do you know of any drastic differences in 2.0 vs 3.0? Thanks a lot!
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Kevin, There is not much changes in Selenium 3 only some drivers added and some old fixes. To run same test in multiple machine you can create 2 node. Example - Node1 for Win and Node 2 for MAC and then register them to hub. While executing test you can pass which system to take for running.
@elvenpath7
@elvenpath7 4 ай бұрын
Very clear explanation thank you. Is it possible to use testng with this approach ?
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
Yes with thread count and parallel attribute in TestNG
@yashdewangan8450
@yashdewangan8450 6 жыл бұрын
Hi Mukesh, Thanks for making such a informative video. would be nice if you can guide us in your next video for integration Browserstack with maven and cucumber. Thanks
@kasunherath2173
@kasunherath2173 4 жыл бұрын
Hi I get the following error when the test is executed Unable to create new service: GeckoDriverService Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: 'PYXLE-000354', ip: '169.254.74.239', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181' Driver info: driver.version: unknown Command duration or timeout: 51 milliseconds
@PoojaPanchal12
@PoojaPanchal12 3 жыл бұрын
How would I be able to run tests on multiple machines if need to connect to the client's VPN to be able to access the web application? Will it suffice if the hub and nodes are on the same network?
@i-techtutor2738
@i-techtutor2738 5 жыл бұрын
File upload from desktop by using autoit sikuli and robot supported in browser stack ..if yes mean pls specify setup ..if no mean recommend alternative way
@SauravKumar-xj4lm
@SauravKumar-xj4lm 7 жыл бұрын
Hello mukesh , when i execute the jar the i am getting this issue: no main manifest attribute.
@350avinash
@350avinash 5 жыл бұрын
very good video, Really helpful
@manoranjanmoharana9901
@manoranjanmoharana9901 5 жыл бұрын
Hi Mukesh, Thanks for this excellent piece of information. I have a question- How can we enable remote execution setup in cloud for any application which is accessible in organization’s own network. eg I am working in a project where we test on the testing environment of a web app which we can access in company’s intranet only How same site can be tested in cloud
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Hi Moharana you need to set proxy tunnel to access internal site, which cloud u use? SauceLab and BrowserStack provide this feature.
@rajalakshmis201
@rajalakshmis201 3 жыл бұрын
Hi Mukesh, thanks for your guidance for testers like us, your knowledge sharing and clear explanation helps us lot thankyou. one request voice is very low in few videos it would be good volume better.
@TomalKundu
@TomalKundu 7 жыл бұрын
Hi, Mukesh i am getting this (Selenium build info: version: '3.4.0', revision: 'unknown') issue while setting up grid hub in command prompt
@gauravsaikia7462
@gauravsaikia7462 5 жыл бұрын
Hi Mukesh, while using BrowserStack in grid environment how the nodes getting registered to my hub. Normally we are registering each nodes to the hub but here how we are doing it. Because here in cloud nodes we are not running any java -jar commands
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Hi Gaurav in cloud all these setting are done wit nodes and hub so we just need hub url which is provided by BrowserStack.
@arunab1624
@arunab1624 8 жыл бұрын
Hi mukesh, Can you upload a video for SVN tutorial.How Testers use this tool?.......plzzz
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Hey Aruna sure will upload soon.
@MrAdikhare
@MrAdikhare 3 жыл бұрын
you have not added any line for a firefox driver , how it is running with out the statement, without driver initialization?
@Mukeshotwani
@Mukeshotwani 3 жыл бұрын
Hi Aditya, earlier there was no drivers was needed for FF but now its mandatory to use Gecko driver.
@veeraratna
@veeraratna 7 жыл бұрын
Thanks Again Mukesh
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Welcome Ratna. Happy weekend.
@veeraratna
@veeraratna 7 жыл бұрын
Thanks, Happy weekend
@harmanmaan870
@harmanmaan870 6 жыл бұрын
nice very informative , thanks
@namrathanayak3608
@namrathanayak3608 5 жыл бұрын
Hi Mukesh Sir, Very nice video.. Thanks for sharing the knowledge. But I have one query, is it possible to run native mobile applications using this selenium Grid?
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Hi Namaratha if it is on cloud then yes
@mysvasi
@mysvasi 8 жыл бұрын
Hi Mukesh , Very good and understandable video for running a for remote servers if you want to run it in different client server not localhost any pre-requisites are required or only creating a node is enough
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Only node with driver is enough to run on remote machines.
@zainubbehl5946
@zainubbehl5946 7 жыл бұрын
Hi Mukesh, Really appreciate this video. But I am getting session not created exception. Could you please help me.
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Thanks Zainub. Can you please add exception logs and explain your scenarion?
@zainubbehl5946
@zainubbehl5946 7 жыл бұрын
Actually sir i was able to run my script on grid. I was trying to run your script only which u hv in your blog. Its a maven project. Now i want to run selenium grid on jenkins. I passed my my batch file which has hub and node commands in post build section . Its opening hub only and getting stuck there . Doesn't open node. Is this the right way to run grid on jenkins. Or there is another way?. Do i have to pass grid config in json file ? Is it possible for you to send me the code for grid config in jenkins ? Thanks
@rohitranjan7322
@rohitranjan7322 5 жыл бұрын
Hi sir thanks for video...i have a question , what is the minimum setup required in node machine(like Eclipse, jdk,selenium- server-satndalone..etc to execute program using grid???
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
HI Rohit, for node machine only Selenium node should be configured with drivers path. Note- Java is must for Selenium grid. Eclipse only need if you want to write the test.
@esakkivash_n
@esakkivash_n 4 жыл бұрын
Hey bro, You can use selenium- server-standalone with drivers, That's enough!
@ajaylachipathruni1438
@ajaylachipathruni1438 8 жыл бұрын
Hi Mukesh, Thank you so much, you helped me a lot in learning selenium. I am working on windows7(both hub and node are on same machine) however it is showing OS as VISTA, program executed successfully. Could you please let me know why it is showing OS as VISTA while i am working on windows7 ?
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Yes for 7 it takes Vista until you dont mention :)
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Yes for 7 it takes Vista until you dont mention :)
@jyothimulakala3286
@jyothimulakala3286 7 жыл бұрын
hii mukesh iam getting (jar file 3.4.0)iam not getting in create a hub in command prompt
@ambermehra
@ambermehra 8 жыл бұрын
hi Mukesh, I used browserstack , do you know how to automate test using Jenkins browserstack plugins ??
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Not tried but will try soon.
@baldygaming2226
@baldygaming2226 7 жыл бұрын
Mukesh question, can you ran a test with multiple browser at the same time? if yes do you have a video for that?
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Please follow below guide learn-automation.com/parallel-execution-in-selenium/
@pink1608
@pink1608 5 жыл бұрын
Hey Mukesh how can I run cucumber framework which consists of feature files and scenario so let's say I want to run three feature file out of 5 and want to run particular scenario in feature file so how to set browser stack
@Mukeshotwani
@Mukeshotwani 5 жыл бұрын
Hi Adita you can use @Tag for Cucumber
@lohithmatam7789
@lohithmatam7789 6 жыл бұрын
Hi Mukesh please tell me how to do cross platform in grid... Need a command ... Getting missing parameters from hub error
@JAIMEJESUS89
@JAIMEJESUS89 4 жыл бұрын
Hello Mukesh: So I can run now the code into BrowserStack, but... How can I run or open more than one Virtual machine in the same execution? It is the same code but I need to run it in many virtual machines... Need I create one class for each virtual machine? Or how can I do it?
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Hi Jaime, if you have multiple virtual machines then all has to be connected as node in Selenium hub. While running the test you need to pass only hub url and selenium hub will distribute the test according to input parameter like browser platform.
@JAIMEJESUS89
@JAIMEJESUS89 4 жыл бұрын
Thank you @@Mukeshotwani I resolve this using TestNG xml like a principal and then this go to call the number of classes that I have implemented. Also I had to start 1 node in CMD for each 5 classes to chrome.
@abhilashgursale8816
@abhilashgursale8816 7 жыл бұрын
Hi Mukesh, Thank you for the video. I dont think anyone can explain selenium grid more perfectly then this. So i tried executing my test cases by setting up browserstack. But since i am using internet from my office it requires a proxy to connect to the URL. So is there any additional configuration required when connections are made through proxy? because when i run the test case i get error: Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' Caused by: org.apache.http.conn.HttpHostConnectException: Connect to hub-cloud.browserstack.com:443 [hub-cloud.browserstack.com/5.255.92.202] failed: Connection refused: connect i tried to ping the URL "hub-cloud.browserstack.com" and the IP "5.255.92.202" but it failed.So we can see there is some problem with connection. normally i can access the URL. It would be great help if you can help on this.Thanks in advance. i confirmed that the URL is right which we provide to the remotewebdriver
@sudhakamble
@sudhakamble 7 жыл бұрын
Hi Bharat I already downloaded gicko from ssleniumhq.org .also added the path in system.setproperty.still getting this error .let know how to go ahead
@subrahmanyamg9314
@subrahmanyamg9314 6 жыл бұрын
Hi Mukesh I am getting this below error. Could you help me how overcomethis. java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Hi Mate, In Selenium 3 there are some changes in Syntax, kindly refer below video for the same kzbin.info/www/bejne/kGTYZ3icj7CHfK8
@harinathgadikota2018
@harinathgadikota2018 6 жыл бұрын
Hi Mukesh I have followed same steps my node and hub is up and running........ but on console it keep saying[ org.openqa.selenium.SessionNotCreatedException: Unable to create new service: GeckoDriverService] plz help me.
@narasimhaimmadi3450
@narasimhaimmadi3450 6 жыл бұрын
Hi Mukesh, Am using selenium 3 version jar. If i want t work on selenium grid need to install any jar or no need??
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Yes for Selenium 3 as well we need JAR to start hub and node
@narasimhaimmadi3450
@narasimhaimmadi3450 6 жыл бұрын
Thank you 😊
@vaibhavumale2975
@vaibhavumale2975 6 жыл бұрын
i am getting below error Exception in thread "main" com.beust.jcommander.ParameterException: Was passed main parameter 'hub' but no main parameter was defined in your arg class Which jar file i need to add ?
@ramyakoyyalamudi3108
@ramyakoyyalamudi3108 5 жыл бұрын
Hi Mukesh, Could you just provide theoretical knowledge on how to run different test cases on different nodes. How we decide particular number of test cases to be executed in particular node. I know with the help @Tag we can run tests parallel. I want to know how we can decide to run particular test cases in particular node or how we distribute the test cases to node.
@mahamriazkhan1355
@mahamriazkhan1355 6 жыл бұрын
Hi Mukesh, I am unable to run this code using chrome. Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. My Code is import java.net.MalformedURLException; import java.net.URL; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; public class Selenium_Grid { public static void main(String[] args) throws MalformedURLException { System.setProperty("webdriver.chrome.driver", "E:\\chromedriver.exe"); DesiredCapabilities cap = DesiredCapabilities.chrome(); cap.setPlatform(Platform.WINDOWS); URL url = new URL("localhost:4444/wd/hub"); WebDriver driver = new RemoteWebDriver(url, cap); driver.get("192.168.1.169:8080/MVRWeb/login.jsp"); } }
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
May be you can set proxy and then run.
@Sk-ly4wg
@Sk-ly4wg 6 жыл бұрын
how to set proxy?
@nitsb681
@nitsb681 8 жыл бұрын
Can we have Sauce labs tutorial.. Its in demand. Thanks!
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Hi Nits i tried with browser stack you can try the same with Sauce lab too.
@sowhat3027
@sowhat3027 7 жыл бұрын
Hello Mukesh, Please make tutorial on How to login in to remote machine (eg. Citrix) and execute test cases
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Mate, You can do using Selenium Grid kzbin.info/www/bejne/bJ_UYpeFnrmXeZo
@bhargavdesai6366
@bhargavdesai6366 8 жыл бұрын
Very good video Mukesh. Can you please upload a video of working selenium webdriver with Ajax. For eg, we have a text box, then we start typing a text. Due to Ajax, we get different text each time we enter something. How will we store and retrieve each text we want. Other would be comparing UI elements (maybe for distortion, color change, etc) with the help of selenium webdriver (maybe integration with some other open source software/technology
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Hi Bhargav try galen framework
@bhargavdesai6366
@bhargavdesai6366 8 жыл бұрын
Thank you Mukesh for the reply. Can we use sikuli for comparison? or any other library in integration with webdriver for the same (except Galen)?
@ChiruVijay
@ChiruVijay 6 жыл бұрын
Hi Mukesh, I am getting below error.... I/O exception (java.net.SocketException) caught when processing request to {}->192.168.146.2:5555: Network is unreachable (connect failed) .....how to solve this...??
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Hi Chiru, Are you using Selenium 3 or Selenium 2?
@amittech3
@amittech3 6 жыл бұрын
Hi Mukesh, How can I test an URL in BrowserStack, which is only accessible via VPN. Creating video on this would be very helpful. Thanks in advance.
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Hi Amit Sharma, You can access without any issues, if you face any issue then you can use the proxy as well. I have tried from VM's and it is working for me. learn-automation.com/how-to-handle-proxy-in-selenium-webdriver/
@milanraval8628
@milanraval8628 6 жыл бұрын
Hi Mukesh, Please help for below issue. Getting below error : Message: System.InvalidOperationException : Unable to create new service: ChromeDriverService Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:32:19.891Z' System info: host: 'MILANQA', ip: '192.168.1.118', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '10.0.2' Driver info: driver.version: unknown (SessionNotCreated)
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Hi Milan please share commands which you used to start hub and node. In Selenium 3 we have some changes
@ajayvashist9409
@ajayvashist9409 6 жыл бұрын
hi Mukesh, I also used the same command as given in the video. please can you share the steps or the changes reqd here to execute with selenium 3.
@swathhyk6468
@swathhyk6468 6 жыл бұрын
Hello Mukesh, Am getting below error: Caused by: org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService Build info: version: '3.10.0', revision: '176b4a9', time: '2018-03-02T19:11:12.151Z' Please help me.
@Shivdas-India
@Shivdas-India 6 жыл бұрын
very gud explanation..........
@apd3392
@apd3392 2 жыл бұрын
Hi Mukesh... Actually I followed all your steps thoroughly, but still I am facing a problem. Whenever I am running it, it is saying "unable to create service:chromedriver service". Please help 🙏🏻🙏🏻🙏🏻
@chanchalsharma1307
@chanchalsharma1307 5 жыл бұрын
Hi Mukesh, I am getting following error while running the script, it launches only driver: org.openqa.selenium.remote.DesiredCapabilities chrome INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()` Starting ChromeDriver 2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387) on port 43297 org.openqa.selenium.remote.ProtocolHandshake createSession org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
@trinadhdn
@trinadhdn 7 жыл бұрын
How can i run the selenium grid through jenkins ?
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
This will help www.agiletrailblazers.com/blog/automated-testing-with-selenium-grid-and-jenkins
@mahboobsiddiqui5398
@mahboobsiddiqui5398 7 жыл бұрын
Hi Mukesh ! How to run script on chrome on other machine as we need chrome driver how to mention and where? i am using selenium 3 grid 3.
@mentorstudies5213
@mentorstudies5213 6 жыл бұрын
Hi Mahboob, You can use the below json config file for configuring the path to your chromedriver File saved as : node_config.json { "capabilities": [ { "browserName": "firefox", "maxInstances": 1, "seleniumProtocol": "WebDriver" }, { "browserName": "chrome", "maxInstances": 1, "seleniumProtocol": "WebDriver", "webdriver.chrome.driver": "path_to_chromedriver" } ], "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "maxSession": 1, "port": 5555, "register": true, "registerCycle": 5000, "hub": "192.168.1.105:4444", "nodeStatusCheckTimeout": 5000, "nodePolling": 5000, "role": "node", "unregisterIfStillDownAfter": 60000, "downPollingLimit": 2, "debug": false, "servlets" : [], "withoutServlets": [], "custom": {} } And you can start the node from console/command prompt using the below command java -jar selenium-server-standalone-3.0.1.jar -role node -nodeConfig node_config.json
@senguptashouvik
@senguptashouvik 4 жыл бұрын
Hello Mukesh, thanks for the guidance. I've followed the same however getting error. WRT Chrome, error - is Caused by: org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService WRT Firefox, error - Caused by: org.openqa.selenium.SessionNotCreatedException: Unable to create new service: GeckoDriverService Can you kindly help?
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Hi Shoubhik, can you post the code as well, seems desired capability which you are passing is causing the issue.
@senguptashouvik
@senguptashouvik 4 жыл бұрын
@@Mukeshotwani Thanks! Below code is firefox based - package seleniumgrid; import java.net.MalformedURLException; import java.net.URL; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import org.testng.annotations.Test; public class selgridtest { //using annotation test after creating the method @Test //creating a method public void test1() throws MalformedURLException { System.setProperty("webdriver.chrome.driver", "C:\\Users\\Shoubhik Sengupta\\Desktop\\NewChrome\\chromedriver.exe"); DesiredCapabilities descap = DesiredCapabilities.firefox(); descap.setPlatform(Platform.WIN10); URL url = new URL("192.168.0.104:4444/wd/hub"); WebDriver driver = new RemoteWebDriver(url, descap); //start browser driver.get("www.amazon.in/"); } }
@senguptashouvik
@senguptashouvik 4 жыл бұрын
Mukesh this code is erroneous as I have used Desiredcapabilities.firefox() and I have mentioned Chromedriver path. "C:\\Users\\Shoubhik Sengupta\\Desktop\\NewChrome\\chromedriver.exe" So I replaced with Desiredcapabilities.chrome(). However, still getting below error - Jun 04, 2020 8:46:47 PM org.openqa.selenium.remote.DesiredCapabilities chrome INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()` FAILED: test1 org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48' System info: host: 'LAPTOP-S4FFIDSK', ip: '10.81.234.9', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191' Driver info: driver.version: RemoteWebDriver
@senguptashouvik
@senguptashouvik 4 жыл бұрын
Mukesh I am unable to proceed. Now even console 192.168.0.104:4444/grid/console is not opening - throws error This site can’t be reached192.168.0.104 took too long to respond. Try: Checking the connection Checking the proxy and the firewall Running Windows Network Diagnostics ERR_CONNECTION_TIMED_OUT NOTE THAT THIS WAS RUNNING FINE INITIALLY AND CONSOLE OPENED AND LATER I COULD CREATE NOTE. ONLY SCRIPT WAS THROWING ERROR. PLEASE GUIDE
@prateekkakkar8145
@prateekkakkar8145 4 жыл бұрын
You need to add chromedriver.exe path while setting up node from cmd
@paulrufussavarapu
@paulrufussavarapu 2 жыл бұрын
Hi Mukesh , I am trying to run this command java -jar "E:\D\Desktop backup\selenium-server-4.1.3.jar" -role hub it isn't executing and i am getting the following instructions Use the `--ext` flag before the command name to specify an additional classpath to use with the server (for example, to provide additional commands, or to provide additional driver implementations). For example: java -jar selenium.jar --ext example.jar;dir standalone --port 1234 Please Help me .
@vaishalijain4181
@vaishalijain4181 2 жыл бұрын
Hii , use standalone jar file as simple jar file will not be able to run individually on local machine use selenium-server-standalone-3.141.59.jar
@arjunchiyan3492
@arjunchiyan3492 6 жыл бұрын
Hai any one knows best combination for Firefox+gecko+selenium standalone driver.....for me not working In this combination 47.0+14.0+2.54.1
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Arjun Selenium 3.12 + Firefox 60 + Gecko 0.20 workes for me.
@JAIMEJESUS89
@JAIMEJESUS89 4 жыл бұрын
Masteeeeeer !!!
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Thanks Jaime
@PraveenTata16
@PraveenTata16 7 жыл бұрын
Hi Mukesh, It's a nice tutorial. I tried the same steps, but I am getting a null reference exception for driver. It says I have to set the browser's executable path. I already did that. But I am still getting the same error. Below is the code and the exception : @Test public void grid_test() { try { System.setProperty("webdriver.gecko.driver", "C:\\Users\\HP\\Downloads\\geckodriver-v0.14.0-win64\\geckodriver.exe"); DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setPlatform(Platform.WINDOWS); URL url = new URL("localhost:4444/wd/hub"); WebDriver driver = new RemoteWebDriver(url, capabilities); driver.get("www.tennis.com/"); } catch(MalformedURLException ex) { System.out.println("Exception = " + ex.getMessage()); System.out.println("Stack Trace = " + ex.getStackTrace()); } } Exception : org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, browserName=firefox, version=, platform=WINDOWS}], required capabilities = Capabilities [{}] Build info: version: '3.2.0', revision: '8c03df6', time: '2017-03-02 09:34:51 -0800' System info: host: 'System_Name', ip: 'my ip', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_131' Exception from node command prompt window: 09:14:47.360 WARN - Exception: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see github.com/mozilla/geckodriver. The latest version can be downloaded from github.com/mozilla/geckodriver/releases 09:14:47.396 WARN - Exception thrown java.lang.NullPointerException Please let me know where I am going wrong. Thanks.
@sumithrac9637
@sumithrac9637 7 жыл бұрын
sir while am practicing am getting such type of error that C:\Users\SREE>java -jarC:\Users\SREE\Downloads\selenium-server-standalone-2.53.0.jar -role hub Unrecognized option: -jarC:\Users\SREE\Downloads\selenium-server-standalone-2.53.0.jar Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. please give me reply sir.
@mahboobsiddiqui5398
@mahboobsiddiqui5398 7 жыл бұрын
www.tomsguide.com/faq/id-1761312/fix-create-java-virtual-machine-issue.html
@mentorstudies5213
@mentorstudies5213 6 жыл бұрын
Please give a space between -jar and C Updated command C:\Users\SREE>java -jar C:\Users\SREE\Downloads\selenium-server-standalone-2.53.0.jar -role hub
@Norayr60
@Norayr60 6 жыл бұрын
Unable to create new service: ChromeDriverService...........Can anyone help me ? chromedriver 2.40 selenium-standalone-jar 3.12.0 chrome version 66.0.3359.181
@golushukla5166
@golushukla5166 6 жыл бұрын
org.openqa.selenium.WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities {browserName: chrome, platform: WINDOWS, version: } Command duration or timeout: 912 milliseconds Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:32:19.891Z' System info: host: 'LAPTOP-EA6E1JBA', ip: '192.168.153.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '9.0.4' Driver info: driver.version: RemoteWebDriver how to sort it out
@scalarocks
@scalarocks 8 жыл бұрын
Your browserstack credentials are visible in the video, you should change them!
@Mukeshotwani
@Mukeshotwani 8 жыл бұрын
Hey Martin Thanks Mate will change now :)
@maheshwerreddy6442
@maheshwerreddy6442 6 жыл бұрын
org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
@Mukeshotwani
@Mukeshotwani 6 жыл бұрын
Hi Maheshwer which selenium version you are using? If it is Selenium 3 then you have some changes in Syntax while creating node.. Let me know what syntax you are using to create node..
@maheshwerreddy6442
@maheshwerreddy6442 6 жыл бұрын
Selenium-3.13.0
@maheshwerreddy6442
@maheshwerreddy6442 6 жыл бұрын
-role node -hub localhost:4444/grid/register
@parasjoshi5509
@parasjoshi5509 4 жыл бұрын
Chrome is all we want ,, make sure to pass a code for that .. everyone is facing an issue ..
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Noted Paras.
@parasjoshi5509
@parasjoshi5509 4 жыл бұрын
@@Mukeshotwani well I've cracked the code , so no problem for me brother , And keep diging and keep grinding ❤️
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Awesome man
@sudhakamble
@sudhakamble 7 жыл бұрын
Hi mukesh,I tried to execute selenium grid program as per your instructions,but I am getting this exception:: FAILED: test1 org.openqa.selenium.WebDriverException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see github.com/mozilla/geckodriver. The latest version can be downloaded from github.com/mozilla/geckodriver/releases
@bharatvarshney2666
@bharatvarshney2666 7 жыл бұрын
Hi Sudha, you download geko driver from www.seleniumhq.com
@sudhakamble
@sudhakamble 7 жыл бұрын
Hi Bharat I already downloaded gicko from ssleniumhq.org .also added the path in system.setproperty.still getting this error .let know how to go ahead
@Mukeshotwani
@Mukeshotwani 7 жыл бұрын
Hi Sudha you have to add all driver path (Chrome, IE, Gecko ) in node machine while creating node itself. Example java -jar selenium-server-standalone-2.45.0.jar -role node -Dwebdriver.ie.driver=.\IEDriverServer.exe
@sudhakamble
@sudhakamble 7 жыл бұрын
Thanks mukesh.Will try .
@Rapperabstar
@Rapperabstar 4 жыл бұрын
It is easier to configure selenium grid now with the help of this utility - github.com/frostyaxe/Talongrid
@Mukeshotwani
@Mukeshotwani 4 жыл бұрын
Thanks Mate, I will look into this repository
@hemininm5649
@hemininm5649 4 жыл бұрын
Hi ihave got an assignment of creating a Selenium implementation in my already exesting framework .what is the procedure that i need to follow
@Rapperabstar
@Rapperabstar 4 жыл бұрын
@@hemininm5649 could you please elaborate on this more. If you are planning to add selenium grid feature then I suggest you to create two classes, one for remotewebdriver capabilities and another for remotewebdriver configuration ( here we will create the instance of it )
@GurudattaPraharaj
@GurudattaPraharaj 7 жыл бұрын
Hii, i did same as u but getting "SessionNotCreatedException" when i run the program. could u please help ?
@JaideepM
@JaideepM 4 жыл бұрын
How we can execute cased im parallel using cloud .Also the reporting part you did not cover. Where the browser driver has to be present while doing parallel execution with / without cloud. Pls respond
How to Generate Log Files in Selenium Webdriver
14:49
Mukesh otwani
Рет қаралды 123 М.
Selenoid или Selenium Grid - что лучше?
41:50
Хасанның өзі эфирге шықты! “Қылмыстық топқа қатысым жоқ” дейді. Талғарда не болды? Халық сене ме?
09:25
Демократиялы Қазақстан / Демократический Казахстан
Рет қаралды 339 М.
Ouch.. 🤕⚽️
00:25
Celine Dept
Рет қаралды 15 МЛН
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
HOOOTDOGS
Рет қаралды 2,6 МЛН
Day 16 - Cross Browser Testing and Parallel Execution In TestNG
1:02:41
Selenium Integration with Cucumber BDD Tool
34:39
Mukesh otwani
Рет қаралды 353 М.
Selenium Integration with BrowserStack || Run Selenium Test on BrowserStack Cloud
22:22
Data Driven Framework in Selenium Webdriver Part 1
28:32
Mukesh otwani
Рет қаралды 344 М.
Selenium 4 Grid Tutorial with examples - Parallel execution in Remote Machines
1:05:17
Mastering Chaos - A Netflix Guide to Microservices
53:14
InfoQ
Рет қаралды 2,2 МЛН
How to Implement TestNG listeners in Selenium Webdriver
24:22
Mukesh otwani
Рет қаралды 153 М.
Хасанның өзі эфирге шықты! “Қылмыстық топқа қатысым жоқ” дейді. Талғарда не болды? Халық сене ме?
09:25
Демократиялы Қазақстан / Демократический Казахстан
Рет қаралды 339 М.