Selenium Framework Tutorial #5 - Move Common Details to Base Class
ฝัง
- เผยแพร่เมื่อ 16 ม.ค. 2022
- 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
One of the best and relevant content with short duration❤❤.
This is the way to create great content...!
Love it 🙏🙏
Please continue this series it is very helpful Thank you 😊
Sir waiting for new videos.. Your way of making us learn is so easier to grab. Wonderful.
Wonderful series. Great work m Loving it
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
My framework setup search ends here. Keep posting framework setup related videos. Thank you.
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
Thank you somuch. Very clear and precise content.
Great sir 🤩 looking forward for the next videos
Initially I was feeling difficulties in frameworks now by seeing your videos I have improved a lot, Thank you for your wonderful teaching sir 😇
Glad it was helpful!
Keep watching for more videos.
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
wonderfull explanantion ,gratitude....
full series is very helpful. 👍Request you to add some more videos in the series.
Really helpful, everything was explained in very details.
Glad it was helpful!
Keep watching for more videos and tutorials.
Great Work! Keep doing
Thank you so much.
Keep watching for more videos.
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?
Thanks sir it's very easy and useful
Most welcome Keep watching and sharing.
Super Tutorials 👍 much appreciated
My pleasure!
Keep watching and subscribe for more videos and tutorials.
Awesome so much helpful Thanks.
Glad it was helpful! Keep watching and sharing.
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
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
Hi,
some are getting null pointer exception when running this code and would you be able to resolve it?
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 😊👍🙏
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 😊👍
Getting null pointer exception, driver is static only as you have, done the same way you have done
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.
Same issue encountered.. Any suggestion to resolve it..?
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
can you please provide one session for utilities class and also cucumber sample session
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?
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?
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
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?
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
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 ?
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 ?
did u solve?
@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?
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")
public static WebDriver driver;
Can anyone explain the code?? Which java concepts are in above line?
Sir i am getting null pointer exception..i have written code parallelly with you.. exactly the same thing
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.
@@brokenheart975 not working. by eliminating first statement.
is there any version issue?
i installed java 20
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);
}
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
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");
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)
sir fremwork ka or layer base class ka
Please give python testing framework sir please
getting error - java.lang.NullPointerException: "base.BaseTest.driver" is null
Sir I am getting NullPointerException pls help
You forgot to mention installing TestNG.
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
ANy one can let me know how to resolve this issue
Hi Sir,
When I am extending the class it is not readings the testcase driver
Getting testcase.test.driver is null.
What to do
make webdriver as public static
Hi. why is the driver declared as static?
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
I am getting a null pointer exception here
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?
Same here,,,,
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.
yes getting same error.
Cannot invoke "org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)" because "testcase.MyFirstTCFW.driver" is null
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)
"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
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();
}
}
Exception in thread "main" java.lang.NullPointerException
at javamavenframework.Myfirsttest.main(Myfirsttest.java:16)
this error come what to do//
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.