Yes Kushan it really solved many QA and Developer issues. Sure I will try to make more videos on Docker , in the meanwhile check Zelenium as well which works on Docker with Kubernates
Thank you Mukesh, For posting such a good video, I have a questing that Since Docker is similar to platform as service, can we have a container with WindowsOS from MAC machine ?
Hi Prashanth, By default node will be present inside docker container, if you wish to delete docker container then you can delete the running container.
Hi Mukesh, Is this using Selenium webdriver 4 alpha? The other question I have is whether do I need to setup selenium grid locally on my machine? Any help in this regard is really appreciated.
Hi mukesh, thanks for the video.it was a good learning to me. I have a question, how can be run selenium tests in parallel mode of same browser? for example I have 10 testcases, that needs to run parallelly in 5 different containers in chrome browser?
HI Priti, docker will platform for execution. Instead of running VM many companies prefer running on Docker. You can scale up and down depends on execution.
Thanks for the video Mukesh, But the relationship setting command for a hub and different nodes(like chrome, Firefox) are missing. Can you please info on them ?
Basically, We need to run the hub, the respective nodes (firefox, chrome) that's being missed out in the video as the port number usage is also critical. Requesting info on this.
I still have one more doubt... M using maven -chrome image from docker .. i can c my code is able to produce output which I provided in sysout however I wanted to open chromedriver for that I also used webdrivermanagager.. so my question is in this grid will be up automaticall
Mukesh, you have set the browser as Firefox and Chrome with the help of capabilities. I noticed that you were using Mac platform while you created the hub and node over docker. If we also want to set the platform like cap.setPlatform(Platform.WINDOWS)...will your code throw error? How can we have different platforms inside different containers the way we have created different browsers? Does our local operating system have any role in creation of container?
Hi Pankaj as of now container are linux containers so when u don't mention platform if takes default and run linux containers. You can connect your windows system as node to hub then when u mention platform windows then it will run on mode which is type of windows
@@Mukeshotwani Thanks for replying. Somehow i am getting confused in this concept. Please bear with me for following last set of queries. 1) How did you manage to create the Linux containers when you local system was having MAC operating system? 2) Are all the containers by default created on linux platform? 3) You mentioned that i can connect windows system as node to hub. Are you referring to traditional method of Selenium Grid concept? 4) Is it possible to create Windows or MAC Containers and run selenium nodes on them? Thank you in advance. :)
As of now All containers are linux containers. Windows container are possible but it will take some time because it is in beta phase. As of now if u need any other machines apart from linux then traditional way u have to connect with hub and then use the same.
@@Mukeshotwani Could you please guide in that direction , Want to run scenarios in parallel on two different browsers ( Chrome and Firefox ) using Cucumber + TestNG
Hello Mukesh, is it possible without using the desired capabilities class...my current project does not have the desired capabilities..how can i run it there
Hi Saurav we use Selenium Grid in order to run our Selenium test on different node. Without this i don't think it will work. In your framework you can create method for Remote Webdriver or modify existing method.
Hi Mukesh Thank you so much .awesome video😊. Could you please explain how to get the extend report on our local machine after the test execution on docker container
Hi Deepa by default reports will be in same machine from where you have executed the test. If you are have scripts in local machine but u r using Docker for only execution then reports will be in same machine.
Hi Mukesh When I try to open our application url in docker container, it is giving the error message "your connection is not private ".Same in Firefox too. But the url is working fine on my local machine. Do you know how to fix this?
Hello Mukesh, thanks for the video and I could able to run successfully in docker. I have question regarding selenium/base. How we can run selenium test in this docker as it does not have chrome or firefox installed. Can you please explain this?
@@Mukeshotwani I think my question was not clear. There is a image available selenium/base where browser is not pre install. In this container how to execute selenium script?
Hi Mukesh, Thanks for the video. Docker is a vast subject in itself. From testing perspective what all is required? Is it just running he test on containers instead of VM's or Grid? Or do we have something more in pocket? 2nd question- This set-up is also achievable in local system by having both chrome and Firefox browsers installed and running the test in parallel. What additional are we achieving with this method? Waiting for the doubts to be cleared. :-)
HI Pankaj, I am glad that you asked this question. 1- Docker will provide you infrastructure so when you have to run test on VM which can handle 10 execution or 50 sessions. Lets assume you need to run 1000 test then you need another VM or VDI machine right, so instead for creating 10 VM you can use containers which are 50 times lightweighted as compared to VM's. please check my first video on Docker where I discussed the difference between VM and Container. last but not the least if you have less number of test and one VM is enough to run your test then you can VM or docker.
@@Mukeshotwani Thanks a lot Mukesh for responding. I believe with docker we can save the infrastructure cost as well. If we need our tests to run on different OS and different browsers than the VM's must have those OS and browser installed. However with docker we can setup infrastructure by pulling the required OS and browser image files.
facing this 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. Please help am using docker tool box in windows 10 home. My Docker image is chrome standalone 85.0 and i dont have grid setup DesiredCapabilities cap=DesiredCapabilities.chrome(); URL u=new URL("0.0.0.0:4444/wd/hub"); and also tried URL u=new URL("localhost:4444/wd/hub");
Hi Mukesh, In my framework I did a setup to execute selenium script into docker containers. Here when I run my testng.xml file then all the scripts are executing successfully into docker containers. But the problem is when I run same script using maven command I.e mvn clean test then it's throwing an errors. Do you know why? If possible could you please try to execute script into docker container using maven command and see if it's executing successfully or not? Thanks
@@Mukeshotwani Getting these errors - Docker Setup.. Oct 05, 2024 8:49:31 PM org.openqa.selenium.remote.tracing.opentelemetry.OpenTelemetryTracer createTracer INFO: Using OpenTelemetry for tracing Execution into Docker Chrome browser.. Execution into Docker Chrome browser.. Execution into Docker Chrome browser.. Execution into Docker Chrome browser.. Docker Down.. stopDocker.bat executed successfully. [INFO] [1;32mTests run: [0;1;32m4[m, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 56.589 s - in [1mTestSuite[m [INFO] [INFO] Results: [INFO] [INFO] [1;32mTests run: 4, Failures: 0, Errors: 0, Skipped: 0[m [INFO] [INFO] [1m------------------------------------------------------------------------[m [INFO] [1;31mBUILD FAILURE[m [INFO] [1m------------------------------------------------------------------------[m [INFO] Total time: 01:01 min [INFO] Finished at: 2024-10-05T20:50:13+05:30 [INFO] [1m------------------------------------------------------------------------[m [ERROR] Failed to execute goal [32morg.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test[m [1m(default-test)[m on project [36mEcommerceRestAssured[m: [1;31mThere are test failures.[m [ERROR] [1;31m[m [ERROR] [1;31mPlease refer to C:\Users\Pritesh\eclipse-workspace\EcommerceRestAssured\target\surefire-reports for the individual test results.[m [ERROR] [1;31mPlease refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.[m [ERROR] [1;31mError occurred in starting fork, check output in log[m [ERROR] [1;31morg.apache.maven.surefire.booter.SurefireBooterForkException: Error occurred in starting fork, check output in log[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:662)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)[m [ERROR] [1;31m at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)[m [ERROR] [1;31m at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)[m [ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)[m [ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)[m [ERROR] [1;31m at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)[m [ERROR] [1;31m at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)[m [ERROR] [1;31m at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)[m [ERROR] [1;31m at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)[m [ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[m [ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)[m [ERROR] [1;31m at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[m [ERROR] [1;31m at java.base/java.lang.reflect.Method.invoke(Method.java:568)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)[m [ERROR] [1;31m[m [ERROR] -> [1m[Help 1][m [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the [1m-e[m switch. [ERROR] Re-run Maven using the [1m-X[m switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [1m[Help 1][m cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
@@Mukeshotwani Errors - [ERROR] Failed to execute goal [32morg.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test[m [1m(default-test)[m on project [36mEcommerceRestAssured[m: [1;31mThere are test failures.[m [ERROR] [1;31m[m [ERROR] [1;31mPlease refer to C:\Users\Pritesh\eclipse-workspace\EcommerceRestAssured\target\surefire-reports for the individual test results.[m [ERROR] [1;31mPlease refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.[m [ERROR] [1;31mError occurred in starting fork, check output in log[m [ERROR] [1;31morg.apache.maven.surefire.booter.SurefireBooterForkException: Error occurred in starting fork, check output in log[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:662)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)[m [ERROR] [1;31m at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)[m [ERROR] [1;31m at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)[m [ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)[m [ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)[m [ERROR] [1;31m at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)[m [ERROR] [1;31m at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)[m [ERROR] [1;31m at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)[m [ERROR] [1;31m at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)[m [ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[m [ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)[m [ERROR] [1;31m at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[m [ERROR] [1;31m at java.base/java.lang.reflect.Method.invoke(Method.java:568)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)[m
@@Mukeshotwani [ERROR] [1;31mPlease refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.[m [ERROR] [1;31mError occurred in starting fork, check output in log[m [ERROR] [1;31morg.apache.maven.surefire.booter.SurefireBooterForkException: Error occurred in starting fork, check output in log[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:662)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)[m [ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)[m [ERROR] [1;31m at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)[m [ERROR] [1;31m at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)[m [ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)[m [ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)[m [ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)[m [ERROR] [1;31m at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)[m [ERROR] [1;31m at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)[m [ERROR] [1;31m at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)[m [ERROR] [1;31m at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)[m [ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[m [ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)[m [ERROR] [1;31m at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[m [ERROR] [1;31m at java.base/java.lang.reflect.Method.invoke(Method.java:568)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)[m [ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)
hi Mukesh, I am constantly getting an error "Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Session [(null externalkey)] not available and is not among the last 1000 terminated sessions. " the Hub & nodes are set up just how you have showed and code (using Intellij Idea is) : DesiredCapabilities cap = new DesiredCapabilities(); cap.setBrowserName(BrowserType.FIREFOX); WebDriver driver = new RemoteWebDriver(new URL("localhost:4445/wd/hub"), cap); driver.manage().window().maximize(); driver.get("www.google.com/"); Thread.sleep(10000); driver.quit(); Any help would be greatly appreciated.
@@Mukeshotwani Hi Mukesh, I have set up Zalenium and I can see the previews. When I run the test its exactly the same behavior, a chrome instance opens and then no activity followed by the same error "org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Session [(null externally)] not available and is not among the last 1000 terminated sessions. " Any more pointers would be very helpful. Thanks in advance
Hi Mukesh, can we pass testng profile in docker compose file? I have different testng profiles for each client, i want to pass the profile name along with docker compose up comamnd. Please help Thanks
@@Mukeshotwani @@Mukeshotwani I am sorry I didn't write properly...I have multiple profiles with client specific xmls in pom.xml..I am using maven docker image and while starting docker-compose cmd I wanted to provide profile name, so it runs specific XML provided in the maven profile
Hi Mukesh, I need your help in Required a password while connecting to my localhost: port number. 127.0.0.1:32762 (VNC Viewer). Where to find the password for this
When I execute my script in selenium it will connect to the container and it will enter the url in address bar when it starts to load it says no internet connect what is the solution for this
Hey Supriya, are you trying with your internal application? Please try running public application like google just to confirm that you are able to run the test on container. If that works then you can set the proxy via Selenium to run your test on container.
Hi Mukesh, I have tried running docker but it ran once and said error..If I run again test get stuck in running mode but nothing happens..Pleas help me
How to run selenium from APIs with spring boot in docker I need to run required test cases from APIs please help me do one video on it. Actually api level is working in my local I'm facing issues when I run this in docker .
Hi Mukesh, Thanks for sharing the details. I am facing a very strange issue. After 1st successful test execution, if test is triggered for the 2nd time it container kind of hangs. Will have to stop chrome container and then it works. Below is what I see on the grid console window. 1 requests waiting for a slot to be free. Capabilities {browserName: chrome} View Config Thanks in advance, Meenakshi
same is the case with me also. 4 requests waiting for a slot to be free. Capabilities {browserName: chrome}Capabilities {browserName: chrome}Capabilities {browserName: chrome}Capabilities {browserName: chrome} not sure why this happens..
@@Mukeshotwani Hm, thanks a ton for the reply. I tried dedicating a lot of resourses to it, but still problems... I did find online, a known issue that running Docker on MacOS, containers have issues inheriting the hosts DNS, and have extreme lag in their own DNS. Will have to look into it more. But thanks again, great tutorial.
You are one of those people who make difference in the society with the knowledge! Good job!
Hi Vailabhav thanks for you kind word. Many thanks to u as well for being active member on channel.
How easily you have explained this concept. Superb ! Could you please shed some light on kubernetes as well.
Thanks a lot mate ✌️
Excellent Tutorials, Mukesh Ji. Right on spot...!!. I followed your steps... as is... and the execution when smooth like a butter... Thank You :-).
Thank you so much Krishna ji, I am glad it worked for you.
Docker has made life so simple...amazing Mukesh ..please share some more tutorials !!
Yes Kushan it really solved many QA and Developer issues. Sure I will try to make more videos on Docker , in the meanwhile check Zelenium as well which works on Docker with Kubernates
Great video mukesh. This is informative and precise, i was able to run the code in docker container successfully. Thank you so much!
great Purushotham 👍 and thank you 😊
Thank you Mukesh, For posting such a good video,
I have a questing that Since Docker is similar to platform as service, can we have a container with WindowsOS from MAC machine ?
You are on 🔥. Lot of thanks man.
Hi Mukesh, Have a question here. After we execute our selenium tests in docker containers, How do we kill the nodes inside the Grid Console
Hi Prashanth, By default node will be present inside docker container, if you wish to delete docker container then you can delete the running container.
Hi Mukesh, Is this using Selenium webdriver 4 alpha? The other question I have is whether do I need to setup selenium grid locally on my machine? Any help in this regard is really appreciated.
Hi mukesh, thanks for the video.it was a good learning to me. I have a question, how can be run selenium tests in parallel mode of same browser? for example I have 10 testcases, that needs to run parallelly in 5 different containers in chrome browser?
Thanks mukesh for this video..what are the advantage of running selenium test on container and do companies will switch to docker for testing
HI Priti, docker will platform for execution. Instead of running VM many companies prefer running on Docker.
You can scale up and down depends on execution.
Hi Is it possible to run selenium webdriver rather than selenium grid inside a docker container...
Hi Mukesh is there any alternative of testng to dynamically route my test cases to different docker images. Tia
Thanks for the video Mukesh, But the relationship setting command for a hub and different nodes(like chrome, Firefox) are missing. Can you please info on them ?
Basically, We need to run the hub, the respective nodes (firefox, chrome) that's being missed out in the video as the port number usage is also critical. Requesting info on this.
Sure Tej let me check if I can add new video on this. Did you also check Zalenium, auto scaling containers th-cam.com/video/PEjUCkNft7s/w-d-xo.html
Super....learnt it.We have more topics in docker ...plz upload it those as well...
Yes Abhi, Next video in on Zelenium (Docker with Kubernates)
@@Mukeshotwani how can we create our own images and containers?
Hi Mukesh
Thanks for Ur videos..
To run selenium test on docker is it complousry to up grid
Hi Vrushali, yes Grid is used whenever you have to run test in VM/Docker/Cloud or any other machine.
I still have one more doubt... M using maven -chrome image from docker .. i can c my code is able to produce output which I provided in sysout however I wanted to open chromedriver for that I also used webdrivermanagager.. so my question is in this grid will be up automaticall
Mukesh, you have set the browser as Firefox and Chrome with the help of capabilities. I noticed that you were using Mac platform while you created the hub and node over docker.
If we also want to set the platform like cap.setPlatform(Platform.WINDOWS)...will your code throw error?
How can we have different platforms inside different containers the way we have created different browsers?
Does our local operating system have any role in creation of container?
Hi Pankaj as of now container are linux containers so when u don't mention platform if takes default and run linux containers.
You can connect your windows system as node to hub then when u mention platform windows then it will run on mode which is type of windows
@@Mukeshotwani Thanks for replying.
Somehow i am getting confused in this concept. Please bear with me for following last set of queries.
1) How did you manage to create the Linux containers when you local system was having MAC operating system?
2) Are all the containers by default created on linux platform?
3) You mentioned that i can connect windows system as node to hub. Are you referring to traditional method of Selenium Grid concept?
4) Is it possible to create Windows or MAC Containers and run selenium nodes on them?
Thank you in advance. :)
As of now All containers are linux containers.
Windows container are possible but it will take some time because it is in beta phase.
As of now if u need any other machines apart from linux then traditional way u have to connect with hub and then use the same.
Hi Mukesh , can we run cucumber tests in parallel on two different browsers ?
Yes Apoorv why not.
@@Mukeshotwani Could you please guide in that direction , Want to run scenarios in parallel on two different browsers ( Chrome and Firefox ) using Cucumber + TestNG
Hi Mukesh,
Thanks for explaining docker so well.
I need to know, how do you run automation suite on ECS cluster ?
Awsome Explanation! Can you suggest How to run CucumberBDD framework using Docker with headless?
Create some more tutorials on docker with selenium ...
I agree!!!
Hello Mukesh, is it possible without using the desired capabilities class...my current project does not have the desired capabilities..how can i run it there
Hi Saurav we use Selenium Grid in order to run our Selenium test on different node. Without this i don't think it will work. In your framework you can create method for Remote Webdriver or modify existing method.
@@Mukeshotwani yeah that should be the next option...i was just checking if it's possible without that or not...thanks for the answer 🙏
Hi Mukesh
Thank you so much .awesome video😊. Could you please explain how to get the extend report on our local machine after the test execution on docker container
Hi Deepa by default reports will be in same machine from where you have executed the test.
If you are have scripts in local machine but u r using Docker for only execution then reports will be in same machine.
@@Mukeshotwani thanks Mukesh. I will check and see why it is not being generated. Thanks for your response 👍
My bad , I forgot to call the rep.flush() function 😅
Hi Mukesh
When I try to open our application url in docker container, it is giving the error message "your connection is not private ".Same in Firefox too. But the url is working fine on my local machine. Do you know how to fix this?
Hello Mukesh, thanks for the video and I could able to run successfully in docker. I have question regarding selenium/base. How we can run selenium test in this docker as it does not have chrome or firefox installed. Can you please explain this?
Hey Raju, docker image which we are using it creates container with browser installed (depends on which image you have used).
@@Mukeshotwani I think my question was not clear. There is a image available selenium/base where browser is not pre install. In this container how to execute selenium script?
Thanks for the great Video. Looks like VNC viewer is not open source, do we have any open source apps, please suggest
Can we install the Docker Hub/ Nodes on CentOS? How does the Chrome/Firefox browser work here on CentOS
Hi Mukesh, Thanks for the video.
Docker is a vast subject in itself. From testing perspective what all is required?
Is it just running he test on containers instead of VM's or Grid? Or do we have something more in pocket?
2nd question- This set-up is also achievable in local system by having both chrome and Firefox browsers installed and running the test in parallel. What additional are we achieving with this method?
Waiting for the doubts to be cleared. :-)
HI Pankaj,
I am glad that you asked this question.
1- Docker will provide you infrastructure so when you have to run test on VM which can handle 10 execution or 50 sessions. Lets assume you need to run 1000 test then you need another VM or VDI machine right, so instead for creating 10 VM you can use containers which are 50 times lightweighted as compared to VM's.
please check my first video on Docker where I discussed the difference between VM and Container.
last but not the least if you have less number of test and one VM is enough to run your test then you can VM or docker.
@@Mukeshotwani Thanks a lot Mukesh for responding.
I believe with docker we can save the infrastructure cost as well.
If we need our tests to run on different OS and different browsers than the VM's must have those OS and browser installed. However with docker we can setup infrastructure by pulling the required OS and browser image files.
@@PankajSharma-pl3nq yes definitely it will save cost
Kindly post the video on how to retrieve the reports from the container
Hi Hari, report part will remain same because we are not changing anything from code except remote url.
Thanks Mukesh, really helpful.
Glad to hear that Thanks Mamun
facing this 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.
Please help am using docker tool box in windows 10 home. My Docker image is chrome standalone 85.0 and i dont have grid setup
DesiredCapabilities cap=DesiredCapabilities.chrome();
URL u=new URL("0.0.0.0:4444/wd/hub");
and also tried URL u=new URL("localhost:4444/wd/hub");
RemoteWebDriver driver=new RemoteWebDriver(u,cap);
HI Saimani, open this url in browser and see if hub is up and running or not
localhost:4444/wd/hub
Is it possible to launch chrome/firefox browser without using remote web driver inside a docker container
Hi Shaurya, Yes you need to use Selenium grid. Without grid you wont be able to triggerin remote machine.
hi, When i try to execute the test script the same way as explained, a blank browser gets launched and returns with session id as null..plz advise
Hi Rasika, it means you are not using updated agent or you have updated chrome browser which is not compatible with TestProject.
Hi Mukesh,
In my framework I did a setup to execute selenium script into docker containers.
Here when I run my testng.xml file then all the scripts are executing successfully into docker containers.
But the problem is when I run same script using maven command I.e mvn clean test then it's throwing an errors.
Do you know why?
If possible could you please try to execute script into docker container using maven command and see if it's executing successfully or not?
Thanks
Hi Pritesh, what error it is throwing?
@@Mukeshotwani Getting these errors - Docker Setup..
Oct 05, 2024 8:49:31 PM org.openqa.selenium.remote.tracing.opentelemetry.OpenTelemetryTracer createTracer
INFO: Using OpenTelemetry for tracing
Execution into Docker Chrome browser..
Execution into Docker Chrome browser..
Execution into Docker Chrome browser..
Execution into Docker Chrome browser..
Docker Down..
stopDocker.bat executed successfully.
[INFO] [1;32mTests run: [0;1;32m4[m, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 56.589 s - in [1mTestSuite[m
[INFO]
[INFO] Results:
[INFO]
[INFO] [1;32mTests run: 4, Failures: 0, Errors: 0, Skipped: 0[m
[INFO]
[INFO] [1m------------------------------------------------------------------------[m
[INFO] [1;31mBUILD FAILURE[m
[INFO] [1m------------------------------------------------------------------------[m
[INFO] Total time: 01:01 min
[INFO] Finished at: 2024-10-05T20:50:13+05:30
[INFO] [1m------------------------------------------------------------------------[m
[ERROR] Failed to execute goal [32morg.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test[m [1m(default-test)[m on project [36mEcommerceRestAssured[m: [1;31mThere are test failures.[m
[ERROR] [1;31m[m
[ERROR] [1;31mPlease refer to C:\Users\Pritesh\eclipse-workspace\EcommerceRestAssured\target\surefire-reports for the individual test results.[m
[ERROR] [1;31mPlease refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.[m
[ERROR] [1;31mError occurred in starting fork, check output in log[m
[ERROR] [1;31morg.apache.maven.surefire.booter.SurefireBooterForkException: Error occurred in starting fork, check output in log[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:662)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)[m
[ERROR] [1;31m at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)[m
[ERROR] [1;31m at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)[m
[ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)[m
[ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)[m
[ERROR] [1;31m at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)[m
[ERROR] [1;31m at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)[m
[ERROR] [1;31m at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)[m
[ERROR] [1;31m at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)[m
[ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[m
[ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)[m
[ERROR] [1;31m at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[m
[ERROR] [1;31m at java.base/java.lang.reflect.Method.invoke(Method.java:568)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)[m
[ERROR] [1;31m[m
[ERROR] -> [1m[Help 1][m
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the [1m-e[m switch.
[ERROR] Re-run Maven using the [1m-X[m switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [1m[Help 1][m cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
@@Mukeshotwani Errors - [ERROR] Failed to execute goal [32morg.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test[m [1m(default-test)[m on project [36mEcommerceRestAssured[m: [1;31mThere are test failures.[m
[ERROR] [1;31m[m
[ERROR] [1;31mPlease refer to C:\Users\Pritesh\eclipse-workspace\EcommerceRestAssured\target\surefire-reports for the individual test results.[m
[ERROR] [1;31mPlease refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.[m
[ERROR] [1;31mError occurred in starting fork, check output in log[m
[ERROR] [1;31morg.apache.maven.surefire.booter.SurefireBooterForkException: Error occurred in starting fork, check output in log[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:662)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)[m
[ERROR] [1;31m at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)[m
[ERROR] [1;31m at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)[m
[ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)[m
[ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)[m
[ERROR] [1;31m at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)[m
[ERROR] [1;31m at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)[m
[ERROR] [1;31m at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)[m
[ERROR] [1;31m at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)[m
[ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[m
[ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)[m
[ERROR] [1;31m at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[m
[ERROR] [1;31m at java.base/java.lang.reflect.Method.invoke(Method.java:568)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)[m
@@Mukeshotwani [ERROR] [1;31mPlease refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.[m
[ERROR] [1;31mError occurred in starting fork, check output in log[m
[ERROR] [1;31morg.apache.maven.surefire.booter.SurefireBooterForkException: Error occurred in starting fork, check output in log[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:662)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)[m
[ERROR] [1;31m at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)[m
[ERROR] [1;31m at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)[m
[ERROR] [1;31m at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)[m
[ERROR] [1;31m at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)[m
[ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)[m
[ERROR] [1;31m at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)[m
[ERROR] [1;31m at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)[m
[ERROR] [1;31m at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)[m
[ERROR] [1;31m at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)[m
[ERROR] [1;31m at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)[m
[ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[m
[ERROR] [1;31m at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)[m
[ERROR] [1;31m at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[m
[ERROR] [1;31m at java.base/java.lang.reflect.Method.invoke(Method.java:568)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)[m
[ERROR] [1;31m at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)
@@Mukeshotwani I added the errors from the Eclipse console here, but after a few seconds, they disappeared.
Dont know why
hello ,Had
a doubt ,Is it necessary to write the script in Headless mode to run it in Docker with Aws
hi Mukesh, I am constantly getting an error "Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Session [(null externalkey)] not available and is not among the last 1000 terminated sessions.
" the Hub & nodes are set up just how you have showed and code (using Intellij Idea is) :
DesiredCapabilities cap = new DesiredCapabilities();
cap.setBrowserName(BrowserType.FIREFOX);
WebDriver driver = new RemoteWebDriver(new URL("localhost:4445/wd/hub"), cap);
driver.manage().window().maximize();
driver.get("www.google.com/");
Thread.sleep(10000);
driver.quit();
Any help would be greatly appreciated.
Hi Pooja, Can you try with Zalenium th-cam.com/video/PEjUCkNft7s/w-d-xo.html
@@Mukeshotwani Hi Mukesh, I have set up Zalenium and I can see the previews. When I run the test its exactly the same behavior, a chrome instance opens and then no activity followed by the same error "org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Session [(null externally)] not available and is not among the last 1000 terminated sessions.
" Any more pointers would be very helpful. Thanks in advance
How do we schedule these Docker tests to run at a specific time during the day?
Hi Mukesh,
can we pass testng profile in docker compose file? I have different testng profiles for each client, i want to pass the profile name along with docker compose up comamnd. Please help
Thanks
Hi Mate, I am not clear with your requirement, What do you mean by testng profile here?
@@Mukeshotwani @@Mukeshotwani I am sorry I didn't write properly...I have multiple profiles with client specific xmls in pom.xml..I am using maven docker image and while starting docker-compose cmd I wanted to provide profile name, so it runs specific XML provided in the maven profile
Hi Mukesh, Thanks for the video
My pleasure Vasista
Hi Mukesh,
I need your help in
Required a password while connecting to my localhost: port number. 127.0.0.1:32762 (VNC Viewer). Where to find the password for this
password is secret
Does this work for selenium IDE?
When I execute my script in selenium it will connect to the container and it will enter the url in address bar when it starts to load it says no internet connect what is the solution for this
Hey Supriya, are you trying with your internal application? Please try running public application like google just to confirm that you are able to run the test on container. If that works then you can set the proxy via Selenium to run your test on container.
afetr running hub and nodes, local host link not opening. After execution of xml file, in the console showing like this 'os not found'.
Hi Bittu, you can use docker-compose file for Selenium grid which automatically starts hub and node.
You should have covered from scratch ... how to setup container is a big question now..
How do I practice brother
Hi Mate,I have already covered in channel, please check 😊
Here is the link th-cam.com/play/PL6flErFppaj1quyeiIF8Rz7nlBPOZTk6d.html
@@Mukeshotwani thank you so much brother .. this will definetly help alot
Hi Mukesh, I have tried running docker but it ran once and said error..If I run again test get stuck in running mode but nothing happens..Pleas help me
Hi Jagadish, make sure you have enough memory if you are using docker containers
hi Mukesh, how to validate the file being download in selenium docker container
How to run selenium from APIs with spring boot in docker I need to run required test cases from APIs please help me do one video on it. Actually api level is working in my local I'm facing issues when I run this in docker .
Hi Mukesh,
Thanks for sharing the details. I am facing a very strange issue. After 1st successful test execution, if test is triggered for the 2nd time it container kind of hangs. Will have to stop chrome container and then it works. Below is what I see on the grid console window.
1 requests waiting for a slot to be free.
Capabilities {browserName: chrome}
View Config
Thanks in advance,
Meenakshi
same is the case with me also.
4 requests waiting for a slot to be free.
Capabilities {browserName: chrome}Capabilities {browserName: chrome}Capabilities {browserName: chrome}Capabilities {browserName: chrome}
not sure why this happens..
Great Video
Thanks Dipak Bhai 😃
I am getting error while running the container "No such host is known", How to fix the issue. Can you please help me.
Hi Sachin, make sure hub is active and running before running the test.
connect: The requested address is not valid in its context. (10049). When I give the port in the vnc viewer, i get this error. Any solutions?
i've solved the problem by replacing 0.0.0.0:portNumber with localhost:portNumber
@@Margarita-sh3kr and password secret
It required a password while connecting to my localhost: port number. 127.0.0.1:32762 (VNC Viewer). Where to find password for this
Nicely explained
Thank you so much 🙂 Deo
Hi, My execution of test in browser is not showing what to do, I am only getting results pass fail
Hi Shazia, by default test will run headless mode.
Web driver exception session deleted because page crash. How to solve the issue
Use update image for grid which version u r using?
how to run it on internal website..? How to setup proxy ? please share
Do you know Proxy class in selenium ?
@@Mukeshotwani yes..I have tried but. It did not work for me.
May be I did something wrong
@@gurinder22525 can u share code here
?
@@Mukeshotwani
public static WebDriver dockerChrome() throws Exception {
String url = "localhost:"+docker_local_port+"/wd/hub";
capabilities = new DesiredCapabilities();
Proxy proxy = new Proxy();
proxy.setHttpProxy("10.140.3.60");
capabilities.setCapability(CapabilityType.PROXY,proxy);
capabilities.setBrowserName(BrowserType.CHROME);
capabilities.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS,true);
capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
driver = new RemoteWebDriver(new URL(url),capabilities);
return driver;
}
The internet in the container is impossibly slow. Google can't load. Does anyone have any idea how to fix or debug this? The tests work fine locally.
Hi Over, container uses system resources so make sure system has enough resources to run test in container.
@@Mukeshotwani Hm, thanks a ton for the reply. I tried dedicating a lot of resourses to it, but still problems... I did find online, a known issue that running Docker on MacOS, containers have issues inheriting the hosts DNS, and have extreme lag in their own DNS. Will have to look into it more.
But thanks again, great tutorial.
Hi all ,anyone able to execute in chrome and firefox using docker images ,need help
Hey Vasista what issues are you facing?
hi @Vasista Have you done this. I need help in it
Guruji at its best