Here i used different websites for different commands used in java
WebDriver is automation testing tool just like IDE RC grid.
Selenium is one of the most widely used open source tool in market.
Selenium only support web application.
It was developed by Jasson huggins.
Selenium supports multiple different platforms browsers and programming languages.
Winium which is the sister of Selenium use for desktop applications like windows applications.
Platform:- p windows Linux Solaris Mac / OS
Browsers:- Chrome Firefox IE
Programming languages:- Java c# perl ruby
Pre-req to learn Selenium :- Basic understanding of Java
Automation Testing:- it is process to automate any software application. This process uses the specialised tools to automatic execution of manually designed test cases without any manual intervention. By the help of Automation Testing tool we can access this data as well as we can compare actual and expected result. Automation Testing cover both functional and nonfunctional testing. Functional automation is used for automation of functional test cases. Performance automation is used for automation of non functional test cases.
Functional automation tools are as below:-
Selenium :- open source
QTP :- provide by HP
Rational robot :- provided by IBM
Coded UI :- provided by Microsoft
Auto IT :- open source
Non-functional automation:-
Loadrunner :- provided by HP
Jmetre:- provided by Apache
Zap :- open source
Sdlc software development life cycle
Stlc software testing life cycle
ATLC Automation Testing life cycle
Automation Testing life cycle:- Phases
Test automation feasibility analysis
Test tool selection
Find scope of automation
Planning script design and development
Test execution
Automation maintenance
If we can open any website for example Facebook whatever you can see or web element. If you want to locate anything on a webpage so we gonna use locators (first we have to right click then go for inspect) API is the medium to perform any operation between database and user interface so basically it's a carrier.
Selectorhubs is xpath.
We perform below besic
operation on any web page :- click() Enter data mouse hover scroll
Method types in Selenium:- first webdriver methods second web element operational methods
System.Setproperty ("webdriver.chrome.driver","D:\softwares\cromedriver_win32\chromedriver.exe");
WebDriver is an interface. Automation script in deal with 2 methods:- WebDriver methods
Web element operational methods
WebDriver Methods:- #. get(): It is used to open url.
#. getCurrentUrl(): It is used to get the url address of current opened url.
#. getTitle(): It is used to get the title of current web page.
#. findElement(): It is used to find the single/unique web element on web page.
#. findElements(): It is used to find one or more than one web elements on web page by using List interface.
#. close(): It is used to close the current window. If there are multiple windows, it will close the current window which is active.
#. quit(): It is use dto quit all associated window which is opened.
#. getWindowHandle(): It is used to handle single window.
#. getWindowHandles(): It is used to handle multiple windows.
#. switchTo:- It is used to switch from one window to another window, frame, alert, popups.
#. navigate(): It is used to open url, refresh the page, navigate back, navigate forward, etc.
#. manage(): It is used to maximize the window.
#. getPageSurce(): It is used to get the page source.
PROGAM BASED ON ABOVE METHODS
https://github.com/tasterntester/Selenium-Webdriver/blob/main/OpenUrlProgram.java