Hi naveen , great video. one small thing - regarding lines 25,26 I'm not sure it's correct to say that nothing return ( 14:15 , 14:47 ) , since what's actually return is the 'singleton_instance' , which means y,z will point to the same address as x , that's why when you print y.str and z.str you get the same upper case string as x.str
Hello Sir, I have one question If Two threads are accessing the Singleton class object at time then what will happen or what problem will come and how we resolve such problem.
Hey, It looks like there is problem in your example. If we call openBrowser() method twice - than it opened two chrome browsers. So I think we should move this line "driver = new ChromeDriver" or in private constructor or in if block of getInstance method. So after that we avoid of possibility to open two browsers at the same time.
Hi naveen..very informative and useful videos..you are really doing a great job and very good explanation. Could you please make a video on about Ant build tool and how to implement Ant in TestNG framework. Thanks in advance!!!
Thank you for the great video, I have a comment: What if you have multiple test methods in your Test Class??? let's say we have another test method called public void test02() {} before this method you're trying to get an instance of WebDriver, it will never create a new instance of our Singleton class (Driverinit), but simultaneously the instance of WebDriver is not null, moreover try to handle any element in the second test method, it will throw (SessionNotCreatedException) as you've already quitted or closed the driver!!!
hello, sir your huge fan. I have one doubt on time 10.38 why you call a static method with classname "Singleton x =Singleton.getinstance();" we can call a method directly "Singleton x = getinstance();" its worked and according to me there no need to call through the class name. please explain it Sir !! thank you !
@Naveen Automation Labs : Please Create Video for "Serialization and Deserialization in Java" and its Implementation in Automation Framework. Thanks ~PS
sir while changing x.str valve other 2 reference value changed. And same thing is repeated in z.str value is it corroct sir.And where we can use this like any application where we use this.
Hi Naveen, I had one query, Let say in TestFolder, My project contains 40 Test cases, and i m using Page object model, Do i need to use Local Webdriver instance for every test case