Selenium Framework Tutorial #5 - Move Common Details to Base Class

  Рет қаралды 45,239

Software Testing Mentor

Software Testing Mentor

2 жыл бұрын

Get all my courses for USD 5.99/Month - bit.ly/all-courses-subscription
In this Selenium Framework Tutorial, we will learn how can we move common details to base class of test automation framework.
👉 FULL PLAYLIST - Selenium with Java: bit.ly/selenium-webdriver-tut...
👉 More Training's at: training.rcvacademy.com
🌟 Please hit LIKE ❤️, SHARE, and SUBSCRIBE for more AMAZING courses:
🔔 SUBSCRIBE to CHANNEL | Click the link to Subscribe: bit.ly/2YGU6JM
🌟 TEST AUTOMATION COURSES 🌟
👉 Selenium with Java: bit.ly/selenium-webdriver-tut...
👉 Selenium with Python: bit.ly/SeleniumPythonTutorial
👉 Robot Framework Automation: bit.ly/robot-framework-tutorial
👉 TestNG Tutorial: bit.ly/testng-tutorial
👉 PyTest Tutorial: bit.ly/PyTest-Tutorial
👉 Jenkins Tutorial: bit.ly/jenkins-tutorials
👉 Git and GitHub Tutorial: bit.ly/git-and-github-tutorial
👉 Python Logging Tutorial: bit.ly/python-logging-tutorial
👉 Selenium XPATH Tutorial: bit.ly/selenium-xpath-tutorial
👉 CSS Selectors Tutorial: bit.ly/css-selectors-tutorial
👉 JSONPath Tutorial: bit.ly/2sIZIFG
👉 Python Behave Tutorial: bit.ly/python-behave-tutorial
👉 Cucumber Selenium Tutorial: bit.ly/cucumber-selenium-tutorial
🌟 MANUAL TESTING AND ISTQB COURSES 🌟
👉 Manual Testing Full Course: bit.ly/SoftwareTestingTutorial
👉 ISTQB Agile Tester Course: bit.ly/istqb-agile-tester-cert...
👉 ISTQB Foundation Level Course: bit.ly/istqb-foundation-level-...
🌟 SOFTWARE TESTING MOCK INTERVIEWS 🌟
👉 bit.ly/software-testing-mock-...
🌟 SOFTWARE TESTING INTERVIEW QUESTIONS AND ANSWERS 🌟
👉 bit.ly/software-testing-inter...
🌟 RESUME AND CAREER TIPS 🌟
👉 Interview Prep Tips: bit.ly/interview-and-resume-tips
👉 Career Tips: bit.ly/software-testing-caree...
🌟 API TESTING COURSES 🌟
👉 SoapUI Tutorial: bit.ly/Sopui-tutorial
👉 Postman Tutorial: bit.ly/2PBbhI7
👉 Katalon API Testing: bit.ly/Katalon-API-Testing-Tu...
🌟 PROGRAMMING COURSES 🌟
👉 Java for Testers: bit.ly/2F1iL1B
👉 Python for testers: bit.ly/python-for-testers
👉 Python Basics: bit.ly/python-programming-tuto...
🌟 TEST MANAGEMENT TOOLS 🌟
👉 TestLink Tutorial: bit.ly/TestLink-Tutorial
👉 TestRail Tutorial: bit.ly/testrail-tutorial
👉 PractiTest Tutorial: bit.ly/practitest-tutorial
👉 TestLodge Tutorial: bit.ly/testlodge-tutorial
🌟 AGILE TESTING TOOLS 🌟
👉 Zephyr for Jira: bit.ly/zephyr-for-jira-tutorials
👉 Zephyr for Jira: bit.ly/learn-zephyr-for-jira
🌟 ATLASSIAN JIRA COURSES 🌟
👉 Jira Beginner Tutorial: bit.ly/jira-beginner-tutorial
👉 Jira Workflow Tutorial: bit.ly/2EzKOEB
👉 Jira Cloud Tutorial: bit.ly/Jira-Cloud-Tutorial-fo...
👉 Jira Administration Tutorial: bit.ly/36MPPFR
👉 Jira Intermediate Tutorial: bit.ly/Atlassian-JIRA-tutorials
👉 Jira Essentials Training: bit.ly/jira-tutorials
🌟 AGILE PROJECT MANAGEMENT COURSES 🌟
👉 Confluence Tutorial: bit.ly/Confluence-Tutorial
👉 Jira Work Management: bit.ly/jira-work-management
👉 Jira Roadmap Tutorial: bit.ly/jira-roadmaps-tutorial
🌟 AGILE BASICS COURSE 🌟
👉 Agile Tutorials: bit.ly/agile-tutorials
👉 All Playlists of SoftwareTestingMentor Channel: / softwaretestingmentor
👉 All Playlists of RCV Academy Channel: / @rcvacademy
🌟 FOLLOW US ON TWITTER 🌟
/ rcvacademy
/ swtmentor
/ mrmverma
🌟 LIKE US ON FACEBOOK 🌟
/ softwaretestingmentor
/ rcvacademy47
🌟 OUR TUTORIAL WEBSITES 🌟
www.softwaretestingmentor.com
www.rcvacademy.com
🌟 GET MY TRAININGS ON UDEMY 🌟
www.udemy.com/user/manish68/
✨ Tags ✨
selenium framework,selenium webdriver,selenium webdriver tutorial,selenium framework from scratch,selenium framework tutorial,selenium framework tutorial for beginners,selenium framework using java,selenium framework for beginners,test automation selenium,selenium base class example,selenium base class,selenium base class java,selenium base test class,base class selenium java,base class selenium,base class creation in selenium
✨ Hashtags ✨
#SeleniumTutorial #SeleniumJavaFramework #SeleniumFramework #Framework #SeleniumWebDriverJava #RcvAcademy #SoftwareTestingMentor
🌟 Join this channel to support my work 🌟
/ @softwaretestingmentor

Пікірлер: 78
@559gajananbavadekar2
@559gajananbavadekar2 14 күн бұрын
One of the best and relevant content with short duration❤❤.
@maheshburud3418
@maheshburud3418 2 жыл бұрын
This is the way to create great content...! Love it 🙏🙏
@harichandra1131
@harichandra1131 2 жыл бұрын
Please continue this series it is very helpful Thank you 😊
@rmahideep
@rmahideep 2 жыл бұрын
Sir waiting for new videos.. Your way of making us learn is so easier to grab. Wonderful.
@flowrinnoronha4286
@flowrinnoronha4286 2 жыл бұрын
Wonderful series. Great work m Loving it
@prasadreddy443
@prasadreddy443 2 жыл бұрын
Thank you somuch. Very clear and precise content.
@saravananmohan4213
@saravananmohan4213 2 жыл бұрын
Great sir 🤩 looking forward for the next videos
@VloggerBubu
@VloggerBubu Жыл бұрын
i saw a person who was writing framework in selenium in intellij and before he write a code there was cursor writing itself in gray color and this person just was choosing the options. it was amazing
@kiransingh8239
@kiransingh8239 2 жыл бұрын
wonderfull explanantion ,gratitude....
@snehaingalkar491
@snehaingalkar491 2 жыл бұрын
full series is very helpful. 👍Request you to add some more videos in the series.
@sachinbs2031
@sachinbs2031 2 жыл бұрын
Initially I was feeling difficulties in frameworks now by seeing your videos I have improved a lot, Thank you for your wonderful teaching sir 😇
@softwaretestingmentor
@softwaretestingmentor 2 жыл бұрын
Glad it was helpful! Keep watching for more videos.
@VloggerBubu
@VloggerBubu Жыл бұрын
i saw a person who was writing framework in selenium in intellij and before he write a code there was cursor writing itself in gray color and this person just was choosing the options. it was amazing
@kannanmanoharan6142
@kannanmanoharan6142 2 жыл бұрын
My framework setup search ends here. Keep posting framework setup related videos. Thank you.
@VloggerBubu
@VloggerBubu Жыл бұрын
i saw a person who was writing framework in selenium in intellij and before he write a code there was cursor writing itself in gray color and this person just was choosing the options. it was amazing
@aakanksha9050
@aakanksha9050 Жыл бұрын
You are Amazing Sir. I am following you since couple of days and this is THE BEST Testing channel I have come across. I salute your hard work and your knowledge!!!! I will definitely join your channel. Just one question , Do you have selenium full course on Udemy , I found 2 course over there but those are different. or Do you provide online classes on any other platform?
@user-jz9xe7rt9l
@user-jz9xe7rt9l Жыл бұрын
Really helpful, everything was explained in very details.
@softwaretestingmentor
@softwaretestingmentor Жыл бұрын
Glad it was helpful! Keep watching for more videos and tutorials.
@kaleemaftab4971
@kaleemaftab4971 2 жыл бұрын
Great Work! Keep doing
@softwaretestingmentor
@softwaretestingmentor 2 жыл бұрын
Thank you so much. Keep watching for more videos.
@MamunRashid-er8yz
@MamunRashid-er8yz 11 ай бұрын
Super Tutorials 👍 much appreciated
@softwaretestingmentor
@softwaretestingmentor 11 ай бұрын
My pleasure! Keep watching and subscribe for more videos and tutorials.
@rkmehta4597
@rkmehta4597 2 жыл бұрын
Thank you sir it is very helpful for me You can add one thing while writing scripts please just tell which java concept we are using here like hashmap so we can relate script with java
@VloggerBubu
@VloggerBubu Жыл бұрын
i saw a person who was writing framework in selenium in intellij and before he write a code there was cursor writing itself in gray color and this person just was choosing the options. it was amazing
@GauravGupta-vo4ii
@GauravGupta-vo4ii 9 ай бұрын
Awesome so much helpful Thanks.
@softwaretestingmentor
@softwaretestingmentor 9 ай бұрын
Glad it was helpful! Keep watching and sharing.
@TireshaPiyanandaTipi
@TireshaPiyanandaTipi Жыл бұрын
Hi, some are getting null pointer exception when running this code and would you be able to resolve it?
@shalinirajasekar6478
@shalinirajasekar6478 7 ай бұрын
Thanks sir it's very easy and useful
@softwaretestingmentor
@softwaretestingmentor 7 ай бұрын
Most welcome Keep watching and sharing.
@bhagyalakshmibhagya8212
@bhagyalakshmibhagya8212 2 жыл бұрын
Sir in selenium playlist the last vedio for java that is hash tag is that the last lecture for automation tester?or you will post the another topic.please do reply sir
@unnatjain4408
@unnatjain4408 2 жыл бұрын
Hi, can you please give 5 examples of "EACH" of the following (Bug/Defect Severity and Priority):- 1) High Severity and High Priority 2) Low Severity and Low Priority 3) Medium Severity and Medium Priority 4) Low Severity and High Priority 5) High Severity and Low Priority ? Thank you 😊👍🙏
@unnatjain4408
@unnatjain4408 2 жыл бұрын
Hi, What could be a good answer to the interview question - What should be done after a Bug is found? Can you please make a video on it Thank you 😊👍
@ashishkumarmishra2346
@ashishkumarmishra2346 2 жыл бұрын
Can we put this sign code before the test because sign code is required before each test case I guess? What would be the best way?
@rutujaadhav2916
@rutujaadhav2916 7 ай бұрын
Hello I want to know how to run tests on multiple browsers parallelly for cross browser testing Could you please share link if video already exist?
@HOPE98901
@HOPE98901 Жыл бұрын
Getting null pointer exception, driver is static only as you have, done the same way you have done
@anishsingh6877
@anishsingh6877 2 жыл бұрын
hi sir, i follow all the steps as you shown in the videos but while running he script i am getting error of element is not interactable. please help sir
@radhasubbu7476
@radhasubbu7476 2 жыл бұрын
@Software Testing Mentor Why we created ReadPropertyFile.java and load the property file. in previous video? In this video we directly loaded the property file into BaseTest.java itself?
@user-rq3by4hc2o
@user-rq3by4hc2o 8 ай бұрын
We do that because we're taking inputs from property file and when we want to use it somewhere we prop.getproperty("name of the key in properties file here")
@Bug_Hunt
@Bug_Hunt 9 ай бұрын
Can someone help me understand the significance of the statement if(driver==null) ? Because I think at the start of the execution the driver is going to be null anyway?
@Budu_k_Shorts
@Budu_k_Shorts 2 жыл бұрын
Sir i am getting null pointer exception..i have written code parallelly with you.. exactly the same thing
@brokenheart975
@brokenheart975 Жыл бұрын
the execption error can be solved by eliminating first if statement which has driver==null value in base test class-setup method, and just keep these 2 lines in it FileReader fr = new FileReader("C:\\New folder\\eclipse\\framework\\testautomationframework\\src\\test\ esources\\configfiles\\config.properties"); prop.load(fr); and thn continue with driver==chrome if statement It got executed for me, after doing so.
@user-xm5zw8rn2g
@user-xm5zw8rn2g 7 ай бұрын
@@brokenheart975 not working. by eliminating first statement. is there any version issue? i installed java 20
@dhruveshkumarpatel9741
@dhruveshkumarpatel9741 4 ай бұрын
Change the code as below in Base class, prop = new Properties() is missing in first if block if(driver==null) { fr = new FileReader("C:\\Users\\Dhruv\\IdeaProjects\\AutomationHybrid\\src\\main\ esources\\configfiles\\config.properties"); prop = new Properties(); prop.load(fr); }
@user-fi1xo1ht2j
@user-fi1xo1ht2j 10 ай бұрын
can you please provide one session for utilities class and also cucumber sample session
@yogeshganpule2695
@yogeshganpule2695 Жыл бұрын
Why are wedriver driver , properties are made static in base test . Static cannot be called in another package and class right ? I need to know why they were made static
@MrBikash69
@MrBikash69 2 жыл бұрын
Sir, This is great session indeed. But. Why I am unable to find TestNG as Run option? It is showing 'Run Configuration' I have TestNG dependency and plug in also, hence i am stuck here. Followed all your steps through the session.
@shubhampaliwal9721
@shubhampaliwal9721 2 жыл бұрын
Same issue encountered.. Any suggestion to resolve it..?
@AbhishekVerma-qf7ll
@AbhishekVerma-qf7ll 7 ай бұрын
public static WebDriver driver; Can anyone explain the code?? Which java concepts are in above line?
@pgandrew2410
@pgandrew2410 7 ай бұрын
Hi sir , i have added testng dependencies in pom.xlm . But when try to execute @Test testng anotation Runas testng is showing !!!! What to do...? Shows only " Run Configurations..' Please help ?
@edanuryardm8252
@edanuryardm8252 5 ай бұрын
did u solve?
@user-kv5gt4rj6r
@user-kv5gt4rj6r 6 ай бұрын
Hi Sir, I am facing the below issue can you please help me to resolve . java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.WebDriver.manage()" because "Announcments.BanerCase1.driver" is null at Announcments.BanerCase1.LoginTest(BanerCase1.java:14)
@user-wf6lo8yx3u
@user-wf6lo8yx3u 8 ай бұрын
Sir I am getting NullPointerException pls help
@user-xm5zw8rn2g
@user-xm5zw8rn2g 7 ай бұрын
getting error - java.lang.NullPointerException: "base.BaseTest.driver" is null
@ravindrasingh8289
@ravindrasingh8289 8 ай бұрын
Sir, you have created Utility class and again you are doing the same things in base class. why it so ? Can't we call the utility class method in base class ?
@nagendranfriends3153
@nagendranfriends3153 2 жыл бұрын
Please give python testing framework sir please
@testinghub1169
@testinghub1169 Жыл бұрын
Hi Sir, When I am extending the class it is not readings the testcase driver Getting testcase.test.driver is null. What to do
@user-rq3by4hc2o
@user-rq3by4hc2o 8 ай бұрын
make webdriver as public static
@user-hq5jb5sw4w
@user-hq5jb5sw4w 4 ай бұрын
sir fremwork ka or layer base class ka
@vinayakgarag5504
@vinayakgarag5504 2 жыл бұрын
Hai sir I completed all selenium series and testng with help of ur tutorial..but I facing issu when I create the base class as it's urs I try Many time it's showing (Java.lang.nullPointerEcpacation)..how to resolve this on please help me .. others wise it's deficult me move on this serious..plz help me sir
@simtarana9988
@simtarana9988 2 жыл бұрын
Received the same error, my file reader path was incorrect. Once I had fixed the path, the program executed without any error. e.g. ("C:\\Users\\..\\Documents\\..\\..\\src\\..\\..\\configfiles\\config.properties");
@adhinathkudikyal9922
@adhinathkudikyal9922 Жыл бұрын
Cannot invoke "String.equalsIgnoreCase(String)" because the return value of "java.util.Properties.getProperty(String)" is null at base.BaseTest.setUp(BaseTest.java:31) - Getting this issue, How to resolve
@adhinathkudikyal9922
@adhinathkudikyal9922 Жыл бұрын
ANy one can let me know how to resolve this issue
@suganthym1438
@suganthym1438 Жыл бұрын
Hi. why is the driver declared as static?
@user-rq3by4hc2o
@user-rq3by4hc2o 8 ай бұрын
He made driver as static because driver is common for everything and if me makes new class and uses drivers method then it would give error saying that i can't find driver instance..so for that we would have to make webdriver as global in the same class and even if there are multiple classes then we have to do the same thing..instead of deaclaring again and again he made it as public static which would make webdriver as accessible to every using public and static because they would use same Webdriver everywhere...for more information go through "static" keyword explanation..Hope that helps
@shahzebkhan-lh6yj
@shahzebkhan-lh6yj 6 ай бұрын
You forgot to mention installing TestNG.
@flowrinnoronha4286
@flowrinnoronha4286 2 жыл бұрын
I am getting a null pointer exception here
@Budu_k_Shorts
@Budu_k_Shorts 2 жыл бұрын
Hi I am also getting error , why is this happening ?? Cannot invoke "org.openqa.selenium.WebDriver.manage()" because "Testcase.MyFirstTest.driver" is null at Testcase.MyFirstTest.loginTest(MyFirstTest.java:17) this is my error can you help?
@TireshaPiyanandaTipi
@TireshaPiyanandaTipi Жыл бұрын
Same here,,,,
@brokenheart975
@brokenheart975 Жыл бұрын
the execption error can be solved by eliminating first if statement which has driver==null value in base test class-setup method, and just keep these 2 lines in it FileReader fr = new FileReader("C:\\New folder\\eclipse\\framework\\testautomationframework\\src\\test\ esources\\configfiles\\config.properties"); prop.load(fr); and thn continue with driver==chrome if statement It got executed for me, after doing so.
@user-xm5zw8rn2g
@user-xm5zw8rn2g 7 ай бұрын
yes getting same error. Cannot invoke "org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)" because "testcase.MyFirstTCFW.driver" is null
@praveenraghu3311
@praveenraghu3311 Ай бұрын
Hi i'm getting the below error - Can you please help? Exception in thread "main" java.lang.NoSuchFieldError: Class org.testng.CommandLineArgs does not have member field 'java.lang.Integer port' at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:69)
@indiatest3155
@indiatest3155 19 күн бұрын
"Sir, I have implemented the code as per your guidance, but I am still encountering a NullPointerException." FAILED CONFIGURATION: @BeforeTest setup java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.WebDriver.get(String)" because "base.baseTest.driver" is null
@ConociendoDesdeElAire
@ConociendoDesdeElAire 10 ай бұрын
Does anyone know why it keeps asking for main if I extended from BaseClass? "Error: Main method not found in class testcase.TestCase3, please define the main method as:public static void main(String[] args)or a JavaFX application class must extend javafx.application.Application". package testcase; import org.openqa.selenium.By; import org.testng.annotations.Test; import base.BaseClass; public class TestCase3 extends BaseClass { @Test public static void LoginTest() { driver.findElement(By.cssSelector("#identifierId")).sendKeys("testuser@test.com"); driver.findElement(By.xpath("//*[@id=\"identifierNext\"]/div/button")).click(); driver.close(); } }
@jayasuryaravichandren2977
@jayasuryaravichandren2977 Жыл бұрын
Exception in thread "main" java.lang.NullPointerException at javamavenframework.Myfirsttest.main(Myfirsttest.java:16) this error come what to do//
@brokenheart975
@brokenheart975 Жыл бұрын
the execption error can be solved by eliminating first if statement which has driver==null value in base test class-setup method, and just keep these 2 lines in it FileReader fr = new FileReader("C:\\New folder\\eclipse\\framework\\testautomationframework\\src\\test\ esources\\configfiles\\config.properties"); prop.load(fr); and thn continue with driver==chrome if statement It got executed for me, after doing so.
Selenium Framework Tutorial #6 - Remove Hardcoded FilePath in Framework
6:28
Software Testing Mentor
Рет қаралды 20 М.
Selenium Framework Tutorial #2 - Setup Selenium Maven Project in Eclipse
10:48
Software Testing Mentor
Рет қаралды 47 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 112 МЛН
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 1,4 МЛН
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 201 МЛН
Selenium Framework Tutorial#3 - Selenium Test without Framework Approach
24:12
Software Testing Mentor
Рет қаралды 39 М.
Selenium Framework Tutorial #7 - Externalize Locators from Test Script
15:27
Software Testing Mentor
Рет қаралды 20 М.
Selenium Framework Tutorial #1 - Create Project Structure and Understand Basics
14:27
#Selenium#BaseClass#WebDriver#AutomationFramework What is a Base Class in Selenium WebDriver
19:31
Selenium Automation and Java learning with Srini
Рет қаралды 13 М.
Selenium Framework Tutorial #4 - Read Values from Property File
8:57
Software Testing Mentor
Рет қаралды 31 М.
Selenium Cucumber Java BDD Framework 6 - Page Object Model | Step by Step
26:34
Automation Step by Step
Рет қаралды 131 М.
Selenium WebDriver Tutorial #11 - Understand WebDriver Interface
21:49
Software Testing Mentor
Рет қаралды 89 М.
Selenium Framework Tutorial #8 - Create and use TestNG.XML in Selenium
9:45
Software Testing Mentor
Рет қаралды 31 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 112 МЛН