Cross Browser Testing in Selenium Webdriver using TestNG Parameters
Ғылым және технология
This video will talk about Cross Browser Testing in Selenium Webdriver using TestNG parameters.
In Selenium webdriver you will get many scenarios where you have to execute same test in different browser. In this case we need to take help of TestNG.
What is Cross browser testing? In Automation it is very popular word. Cross Browser testing refer to test a particular in multiple browsers like IE, Chrome, Firefox etc.
You can refer the same post below.
learn-automation.com/cross-bro...
~-~~-~~~-~~-~
Please watch: "How To Create Maven build For Selenium Framework"
• How To Create Maven bu...
~-~~-~~~-~~-~
Пікірлер: 255
you are my hero bro !!, unemployed facing the Covid19 apocalipse with diabetes and potential corpse, but improving my skills
@Mukeshotwani
4 жыл бұрын
Nobody can stop you until you do.
Hi Mukesh, Excellent presentation, crisp and precise. I have seen several of your video's. You rarely get stuck, which means you are well prepared and know the content well. Please do not stop making such video's, Selenium, JMeter, SOAPUI,,,you can go on and on. Knowledge sharing is a rare gift and you have it !
@Mukeshotwani
7 жыл бұрын
Hey Narasimhan thank you so much for nice feedback. Keep visiting and let me know if any help from my site. Kindly Like Share and Support. Check out my blog for more details. learn-automation.com/
You have made cross-browser testing very simple and easy...Thanks a lot :)
@Mukeshotwani
6 жыл бұрын
Thanks Asad :) I am glad you liked it.
Yours explanation on nay modules is just amazing!!! Thanks for making such wonderful videos for learners
@Mukeshotwani
7 жыл бұрын
Thanks Snehal I am glad you liked it. Keep learning.
I have found this issue a long time and now, I find it.deeply thank you so much!!
@Mukeshotwani
8 жыл бұрын
Hi Tran I am glad to know that you find the solution. Cheers
Thank you! the right place to learn and improve the skills.
Bro, great explanation! cant thank you enough for all your helpful videos.
Thank you, today I have solved my cross browser testing by seeing ur code. Thank you one more time
@Mukeshotwani
3 жыл бұрын
You are most welcome Saritha.
Nice, simple , easy and detailed explaination !! Thanks a lot ! :)
Thanks Mukesh. This video solved several issues for which I was using quite complicated solutions.
hi Mukesh, I have been following your videos on selenium and they are really helpful. content of videos and ur way of explanation is really awsme!!!! u r helping many of beginners like me.Thank you so much :)
@Mukeshotwani
6 жыл бұрын
Hi Chennam Thanks for such a nice feedback :) Keep learning.
Nicely covered the topic. Very good approach towards reducing the complexity. This video helped me to understand this functionality easily. :) :)
@Mukeshotwani
8 жыл бұрын
+neeraj sharma Thanks Neeraj
Thank you Mukish for fantastic explanation.
@Mukeshotwani
5 жыл бұрын
Thanks Mina :)
Excellent Tutoring Mukesh ....next level awesomeness!!!
@Mukeshotwani
7 жыл бұрын
Thanks Ashok
Hi Mukesh, It's really helpful. It cleared all my doubts and I learnt few more things.. Thank you so much and keep posting these helpful videos.
@Mukeshotwani
5 жыл бұрын
Thanks Sristy :) I am glad it helped you.
Very good videos, clear and precise..!!
Thank you Mukesh. Your videos are simple and understandable. Keep up the good work.
@Mukeshotwani
8 жыл бұрын
+abhi keerthan Thanks Abhi keep visiting :)
Very nice explanation. This video helped me to understand the functionality easily. Thank you Mukesh
@Mukeshotwani
8 жыл бұрын
+gopi krishnan Thanks Gopi
Nicely explained...Thank you so much for this video Mukesh
This super...! fantastic...! very easy to understand video..!!! great job!!!
@Mukeshotwani
8 жыл бұрын
+Shrini Pandhare Hi Shrini glad you liked it. Keep visiting.
THANK YOU FOR THIS MAN!
@Mukeshotwani
8 жыл бұрын
+Alishan Ali thnx Ali
Thanks a tonn :) Keep spreading knowledge (y)
Thank you so much Mukesh...I liked this video so much its help me to figure out the question asked in my interview about cross browser testing.. once again thanks.
@Mukeshotwani
7 жыл бұрын
Welcome Kiran :) best of luck for future interviews too.
Thumps up .....without even going through full vdo ....Good Job.....thats the trust I have on your content---One suggestion please increase the font size ......
Hi Mukesh. Thanks for your videos; they're really helpful. I am getting confused on something though. Does this need to be done in addition to putting the browser setup in the Base Class? Or, are they two alternative approaches?
@Mukeshotwani
3 жыл бұрын
Hi Jim, I know I am very late but still want to answer this question. You can keep browser setup, report setup in BaseClass.
Awesome presentation.. Excellent Video..
Abhinandan, behtareen video. :)
Hi Mukesh, Your video was really helpful. But my code structure is more customised that it generates the testng xmls automatically. Editing those XMLS in the explained way is not running the tests in parallel. Please help in finding a solution for this. I can provide you more details if needed on the same. Thanks!
Hi Mukesh, Thanks a lot for the tutorial. Just one query, can we integrate Cucumber with TestNG for BDD?
Thank you!!! for the help in FB!
@Mukeshotwani
3 жыл бұрын
anytime Frank 😊
Excellent video bruh, please make a similar tutorial about automating ios apps using appium. Thanks and keep doing the great job!
@Mukeshotwani
8 жыл бұрын
+arifeen Thanks Arifeen I do not have mac machine so IOS not possible but will update surely later.
Very nice and clear video Mukesh. Thank you very much. :)
@Mukeshotwani
8 жыл бұрын
your most welcome Shankar :)
Thank you soo much ❤️❤️ It's really helpful
@Mukeshotwani
2 жыл бұрын
I am glad it helped 😊 Thanks Sahana
Thank you so much for the share Mukesh, how can we use the same concept for multiple testcases, can you please share how can we use this logic to run for multiple test cases
Hi Mukesh! I really liked your video on it. Could you please also upload cross browser testing with multiple parameters like: url, username ,password,browser etc.
@Mukesh very good lecture, precise, hit the correct thing. One question like you got error on xml parameter test name so you closed classes. But for me am getting error on suite paramtere how can i get over it.
Many many many Thanks
Hi Mukesh, Very Good tutorial give clear understanding. I have one query Mukesh How we manage the cross browser testing when we have multiple Test case or we need to provide duplicate entries? In one of my interview this question was ask.
Hi mukesh your videos relay wonderful videos .
Hi Mukesh,I have a senario in which one method should execute in chrome,and another method should switch to firefox and again switch to chrome. Please let me know how to do that.
quite useful session..thank you
@Mukeshotwani
3 жыл бұрын
Most welcome! Anju
Hi Mukesh, driver.quit() is not working in parallel test execution, can you please make a video for resolving such issue?
Hi Mukesh, Just one query can I use multiple parameter values for a single parameter? If I don't want to use TestNG dataproviders, Can I achieve the same using declaring multiple values of a single parameter in TestNG XML?
Good job keep up the good work
great work bro.
@Mukeshotwani
6 жыл бұрын
Thanks Ajit :)
Thanks for the tutorial but after watching this i had a doubt when do we use selenium grid because you did it without using grid. Using grid we can execute the tests in different machines which u have done in same machine, is that the only difference??
Keep up the good work.
@Mukeshotwani
8 жыл бұрын
+Robert Yu Thanks Robert
Best explanation
Hi Mukesh, My Requirement is execute one test case in multiple browsers and only one extent report should generate. I am using cucumber,selenium, junit,jenkin and saucelab. can u guide me please?
superb video and got clear idea.... thnq bro
@Mukeshotwani
7 жыл бұрын
Cheers Lakshmi Keep learning.
Hi Mukesh... Nice work... It was very useful.
@Mukeshotwani
8 жыл бұрын
+SenthilKumar Lakshmanan Thanx :)
Hi , Pls share the link to Mobile Based Testing/ Performance Testing (Loadrunner) Videos, if it is in your Video Collections?
Well done Mukesh!! I have seen your others videos too and all are good.
@Mukeshotwani
8 жыл бұрын
thanks Pankaj
On same machine installed win 7 (chrome) and another one installed using virtual machine,o/s is Linux(Firefox)can i test cross browser
Hello, Thanks for sharing your knowledge...!! I wanted to execute the the parallel tests using the same driver with multiple instances. How can we achieve this without declaring the another webdriver instance? Background to this question. I have multiple data sets (~50 user accounts) and I wanted to execute one test for all these accounts. Please note that I am reading the test data from the Excel using dataprovider. I think this can be achieved by copying the tests and renaming it with new driver instance variable. But I want it to be the one single method without duplicating the driver instance or tests. Because, my test data (count of user accounts ) in the Excel file may vary time to time. OR Any dynamic approach. Thanks Please help. I appreciate it.
Mukesh , How 'browser' in @paramneter and 'browsername' in verifymethod will relate to each other? both are not same?
Thanks for sharing this video :)
@Mukeshotwani
7 жыл бұрын
Welcome Julissa Keep visiting and let me know if any help from my side.
Hi Mukesh... Your videos are very much helpful. I have one query like how and where do we put the annotation @Parameters in the java code when we have defined a method for browser selection in a different class ?
@Mukeshotwani
6 жыл бұрын
Hi Sandeep, @Parameter should come where you want to accept the parameter. It can be in same class or in a different class as well. Please check video as well kzread.info/dash/bejne/oH6aqa-jic2qZZs.html
hello sir have u uploaded any video on svn and maven if yes can u share the link plz.. i am not able to find it...
Hi Mukesh, i have seen most of your selenium videos they are awesome.... do you take any online classes if you have please tell me ??
@Mukeshotwani
8 жыл бұрын
+sudha rani Thanks Sudha rani. Please share your email i will send you details my email- mukeshotwani@learn-automation.com
GreatJob Bro Keep it up!!
@Mukeshotwani
8 жыл бұрын
+Thousif Dm Thaks Thousif
Good works keep it up
@Mukeshotwani
5 жыл бұрын
Hi Karim :) Thank you so much
This is suitable for little example but for big frame work like hibrid frame work how is it possible pls tell as in real time
Hi Mukhesh, How can I create library to use in my multiple test class? Can you plz upload a video for this?
Very Nice Video !!
@Mukeshotwani
7 жыл бұрын
Hey Nilima, thank you :) keep visiting and let me know if any help in selenium.
Hi Mukesh, for cross browser testing any 3rd party tool available or not .( except selenium provided IE ,chrome ,Opera 3 rd party tool {seleniumhq} ).
@Mukeshotwani
7 жыл бұрын
Sorry Binay I am not sure. I use TestNG only for cross browser testing.
Hi Mukesh, I see that in this video you've used the @Parameter annotation to get data from XML. I'm using Dataprovider in my test as well. Can you tell me how can I use @Parameter in a test that uses DataProvider as well? Thanks
@Mukeshotwani
8 жыл бұрын
+Murtaza Mansoor No Mansoor :)
Hi Mukesh, I am trying to cross browser test . In my case I have specified the browsers in browser factory.class file and kept in common utilities package and call them in my test case . Where should I specify the @parameter tag .? In test case or in browser factory... I tried multiple times but not able to run cross browser test
@Mukeshotwani
5 жыл бұрын
Can you share Praveen your browser factory or common utilities where you are passing parameters?
you made selenium so easy thank you so much Mukesh
@Mukeshotwani
6 жыл бұрын
+Neelam Chakraborty thanks Neelam. I am glad to know that you are enjoying while learning Selenium.
@neelamchakraborty9062
6 жыл бұрын
can you make one video on selenium interview, Now a days they ask from java collections to webdriver and TestNg and to write a program. so what sort of program and all kinda thing. can you please do a video on the same. i have learned all selenium from your videos only. Thanks for your videos.
@Mukeshotwani
6 жыл бұрын
Sure Neelam I will make videos on this soon.
Hi Mukesh....thanks.. great video it helps me lot.
@Mukeshotwani
7 жыл бұрын
Hi Jilani Welcome :) and keep visiting.
@jilaniguddad3932
7 жыл бұрын
Ya sure...
HI Mukesh, really a heartily thanks for all the videos, and a special thanks to this video as bcz i m from cross browser testing, 1 clarification is that we cannot do this without using testng? please ignore as this was so silly as i was new to automation.
@Mukeshotwani
8 жыл бұрын
+Arunkumar R Arun we have to use TESTNG only to do this.
bro, I have to do two test cases in the same browser. one is my main test case and another one to monitor whether the main test case page is going properly without crashing. if it crashes, we have to relaunch the same browser again. is it possible?? Help me, bro.
@How to use cross browser testing with cucumber testng and selenium. Can we execute same feature file with multiple browser simultaneously
thank you sir very nice video .....thank you very much
@Mukeshotwani
7 жыл бұрын
Welcome Venu Babu
Hi Mukesh, is it feasible to work on 2 browsers simultaneously in single test case? I have a scenario where I have to login with user 1 and in parallel with user 2 and then work on both sessions in parallel. Thanks!
@Mukeshotwani
3 жыл бұрын
Hey Anirudh, well in this case you need to run 2 xml which will run in parallel. Currently if you use @DataProvider of testng then it will take record one by one and use in test.
Hi sir , Nice video, good information . thanking you.
@Mukeshotwani
7 жыл бұрын
Most welcome dear
Mukesh sir, how to do Cross Browser Testing with the help of passing through multiple parameter...?
hello sir, your all videos are very nice and helpfull,i have a question in this video that in class u havent written a System.setProperty for FirefoxDriver like other next drivers eventhough it is running,is it possible.
@Mukeshotwani
3 жыл бұрын
Hi Preeti, this video is little old, in old day we did not had any drivers for FF but for every browser we have drivers.
Best one mukesh ...and u have missed "thread-cout" while doing parallel test :) ...anyway I have one Q ..why we need Thread-count in automation ?? Please let me know ....thanks
@Mukeshotwani
4 жыл бұрын
Hi Dheeraj, Thank you. Using thread-count you achieve how many threads you want to invoke.
what is limit of testng thread-count and how execute 100 test case parallelly
Hi Mukesh, My firefox browser is not launching but when i checked in the results below it has been passed with a time of 2s and i am not getting any error. working fine for other browsers I m so confused..plzz help
Hi Mukesh can you please make a video on cross browser testing with the multiple data
Hi, In my class, there are 8 tests with priority (1...8). When I run initially the wensite link opens in all browsers, after that next tests run only run Firefox not in other browsers. Can u suggest something... I will be so thankful to u.
@Mukeshotwani
8 жыл бұрын
Hey Nireesha, can u share code then i can suggest.
Hi Mukesh.. I have executed the same script in my laptop. But when I see the console result, title of the page for chrome is showing correct like "The title of the page is gmail" but for IE it is showing like "The title of the page is WebDriver"..also driver.quit is working for chrome but not for IE. Im confusing. Could you please tell me why im getting like this?
@Mukeshotwani
6 жыл бұрын
Hi Sunder, for title in IE you can use wait. For killing the browser (IE) you can use WindowsUtils.KillByName method.
Dear Mukesh..requesting u to zoom the editor so that it can clearly visible
This nice tutorial How can we use encapsulation in selenium
Mukesh if we have multiple test cases and not all of them i would like to run in multiple browser can we do that? in this example we just have one test case with tag @Test lets say we have two test cases one I want to run in all three browser IE,FireFox and Chrome other I just want to run in Chrome can that be done if so how?
@Mukeshotwani
7 жыл бұрын
Hi Ahmed nice question :) in this case you can use only specific test in test suite which you want to run and pass parameter to that suite.
@waheedahmed6524
7 жыл бұрын
Mukesh otwani well all the test cases have same tags @Test whereas in testng.xml .. or you mean let's say I have public void test12 () and public void test13 () so if I want test12 to run in all browsers whereas test13 only in chrome in that case in testng.xml for test12 I will have to write test block 3 times with each time with different value whereas for test13 I will have to write one with value = chrome correct ?
Hi Mukesh Many thanks for uploading it's really useful. Anyway could you please kindly clarify...."Can we perform cross browser testing using Junit instead of TestNG?
@Mukeshotwani
8 жыл бұрын
+rebel music Hey Rebel we can but I have not tried so not sure about code. I will suggest to use TestNG
Hi Mukesh, I have 4 tests and i want to run all in different chrome instance at same. can you help how we can do it
@Mukeshotwani
6 жыл бұрын
Hi Pankaj, You can set parallel attribute and thread count to run the test in parallel.
Thanks Mukesh for your videos, its superb. Just one feedback the voice in videos is too low even in highest volume setting. Thanks again :)
@Mukeshotwani
4 жыл бұрын
Thank you laxmi, I had this issue earlier but fixed in recent videos. Thank you for providing honest feedback, really appreciated.
@Mukeshotwani
4 жыл бұрын
Hi Mate, new videos dont have this issue. I will record these videos again.
how to use extent report in parallel execution?
Real useful. Any content which states the Extensive usage of TestNG.xml?
@Mukeshotwani
8 жыл бұрын
+pradnya samant will upload soon
Hi Sir..I want to learn automation testing selenium, in person from you as I am willing for job switch.Please can you suggest me.
thanx for the video
@Mukeshotwani
6 жыл бұрын
Welcome Abhi
@abinashbaug6981
6 жыл бұрын
hello sir i have prepared the test suit everything is correct but it is not exicuthing... Only i am getting output " total test run 1, faliure 1, skip 0. what to do.
Hi Mukesh...thanks for the great work. Do you have the video for passing multiple parameters in TestNG? Thanks.
@Mukeshotwani
9 жыл бұрын
Wellington Nz Hi Wellington nopes I have not created yet, but approach will be same. We can pass multiple parameter and receive the same in program like url,uname,password etc. Please try and let me know
@nirajgahukar7665
6 жыл бұрын
I am getting the same error. Got any solution?
How can we fit this code while following POM design patter?? , anybody can help
Hi, I do have a question I did not understand how the value of the (“browser ‘’) have been transferred to (string browserName) they should have the same name I do know if they have the the same name it will work but in your case I just don’t see it please explain this please
@Mukeshotwani
3 жыл бұрын
Yes it same in xml file and same key I have used in class too kzread.info/dash/bejne/rGeG18Vrkq7Uoaw.html
@yourshow3634
3 жыл бұрын
Mukesh otwani thank for your answer but I know that you used the same key in classe and xml but you did not in the methode public void verifpagetitle (string browsername) you used browsername instead of browser that is my question thank you for response
Thanks a Lot
@Mukeshotwani
8 жыл бұрын
+shafaat hussain hey Shafaat your most welcome please check other videos as well.
HI Mukesh !! This Video is too good ... As you told in next video you will discuss "How to pass multiple parameters" Can you share the Link of that Video ?? Thanx
@Mukeshotwani
7 жыл бұрын
Hi Biswa, You can pass n number of parameter using this approach only.
@PraveenTata16
7 жыл бұрын
I found this link which explains passing multiple parameters to the same method: howtodoinjava.com/testng/testng-test-parameters-through-testng-xml-and-parameters-annotation/
Hi Mukesh, The Ffox browser worked fine, but the Chrome and IE browsers opened but they didnt fetch the URL which i passed.Please help me out here.Getting the below message in console:- "Starting ChromeDriver 2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a) on port 4059 Only local connections are allowed. Started InternetExplorerDriver server (32-bit) 3.6.0.0 Listening on port 22200 Only local connections are allowed"