Automation Test Framework
Automation Test Framework
After installed Maven, Check under Windows -> Preferences -> Maven installed
Folder Structure
Pom.xml
Config.properties
ReadConfig.java
Changes in Base Class after done with Config.properties / ReadConfig.java files
Updating the Base class for desired browser (2 changes needed, 1. Base class , 2. Create an xml (testNG.xml) for the same)
testNG.xml file (should be in project level)
Apache POI Jars / XLS test data file / XLSUtils.java are needed and @DataProvider annotation will be used for the same.
XLSUtils.java -> file will have all methods to access the excel file like set/get data, row/column count etc.,
1. Running TC using pom.xml (need 2 plug-ins: 1. Complier, 2. surefire). Add <build> <plugins> <plugin>… after </Properties> and before <dependencies>
Manage Jenkins -> Manage plug-ins-> Install all maven related plug-ins under Available tab
Manage Jenkins -> Global Tool Configuration -> Update JDK details like JAVA_HOME path
Continous Integration (CI)
Git Commands
Once Pushed the code, have to run the jenkins job for executing the tests. Select Git and update the URL of github, pom.xml, Build: clean install.
Selenium 4 features (SS of particular Web elements, new tab, new window, location;xy, hieght & width of an element, Locators)
Relative Locators
Some Info
The Most Common Selenium Challenges
• Dynamic Content
• Flakiness - False Positive and False Negative Results
• Mobile Testing
• Limited Reporting
• Multi-tab Testing
• Manual Testing - visual testing
• Scalability - Cross Browser Testing
• Pop-up Windows
Different types of popup and alerts occur while interacting with a web application, below are few listed:
• Browser level notification: Examples of such notifications can be; “Allow/Decline camera access,” “Allow/Decline
microphone access,” etc. These are browser level notifications that are handled in different ways depending upon the
browsers. For the Chrome browser, ChromeOptions can be used. Similarly, for the Firefox browser,
FirefoxOptions/FirefoxProfile can be used.
• Web-based alerts: Examples of such notifications can be; “This site says….”, “Do you want to leave this site” etc. These are
the alerts that can be handled using Selenium predefined class “Alerts,” which provide various methods like accept(),
dismiss(), etc.
• OS level pop-ups: Selenium capabilities are only bounded with web interaction; hence, handling OS level interactions is
something that can’t be performed using Selenium. These types of pop-ups can be categorized as flash objects which can’t
be accessed using Selenium Locators. “Robot” class is commonly used for interaction with such pop -ups.
https://www.softwaretestingmaterial.com/oops -concept-in-automation-framework/