SeleniumBatch1


Testing : A Process in which comparision between expected behavior with actual behavior is done.


Defect: Difference between expected result & Actual Result/behavior 

What is Automation Testing:
---------------------------
Testing done by some tool


Why to use automation Testing:
-----------------------------
1.Fast
2.Less resources
3.Less Human Error are involved
4.Some Testing like Performance testing not possible Manually & that is done with help of automation tool like Jmeter


What is Selenium ?
------------------
1.It is Functional Automation Testing Tool
2.It is free
3.It is Open Source
4.It is designed for Web Testing(Desktop based Application testing not possible using selenium)
5.It is platform independant(Supports Multiple OS like Windows, Linux, MAC)

6.SUpports Multiple Browser  i.e Chrome, Firefox, Opera, IE etc.
7.Supports Multiple Programming Lanuguage like Java, ruby, python, c# etc.

Selenium Suite:
---------------
1.Selenium IDE
>Record & PlayBack Capability
>Available as Firefox & Chrome plugin
>It is very easy to learn for Tester who is new to automation testing

DisAdv:
1.Only two browser is Supprted (Chrome & Firefox)
2.No Programming language supported hence Code reusability concept can not be implemented
3.Can not be linked to database or Excel
2.Selenium RC(Selenium 1.0)  (Outdated since it was slow)
DisAdv:
1.There is need of RC Server (Acts as a Middle Man) which makes 
your script execution slow
2.RC Server need to started manually everytime which was also consuming time.
3.Selenium WebDriver(Selenium 2.0/Selenium 3.0/Selenium 4.0)
>Both support multiple programming language java, ruby, python etc.
>Both supports multiple browser chrome, firefox, opera etc.
Single Machine+ Multiple Browser
4.Selenium Grid:
----------------
>For Working with Multiple Machine+ Multiple Browser
> There will be one Hub/Master & Multiple Slave/Node
> It is used for various browser & OS combination testing
> Parallel Testing is also possible using Selenium Grid




Environment configuration needed for WebDriver:
-----------------------------------------------
1.JDK
2.Eclipse
3.Selenium Java Libraries
Since We are going to do coding using Java
4.Browser Drivers
chromedriver > For Chrome Browser
geckodriver > For Firefox Browser
Operadriver > For Opera Browser


----------------------------------------

Official WebSite : http://selenium.dev




Locators: A unique Property by  which Selenium will be able to locate/search/find --------- the object.

Types of Locators:
------------------
1.id
2.name
3.linkText
4.CSS
5.Xpath



CSS locator:
------------

Cascading Style Sheet used by dev for controlling color, font, allingment, spacing between 2 paragragh.

CSS locator Syntax:
-------------------
1.CSS with id: tagname#id
input#txtUsername
2.CSS with any property i.e type/value/name/href/any property
tagname[type/value/href='value of that prop']
input[type='password']
input[value='LOGIN']
3.CSS with ClassName
tagname.classname
input.button


Types of Xpath:

Absolute Xpath (Not recommended)
/html/body/div[1]/div[2]/div[1]/div/div/div/div[2]/div/div[1]/form/div[5]/a


Relative Xpath (recommended)
//*[@id="u_0_2_bx"]



input[value='2']






Difference Between findElement & findElements
1. findElement is used for working with single Object & findElements used for working with multiple objects 

2.findElement will be using unique property & findElements will be using common property

3.FindElement will be having return type as WebElement & findElements will be having return type as List<WebElement>
4.findElement throws NoSuchElement Exception
findElements throws No Exception returns empty list


Today's Learning:
-----------------
What is Automation Testing
Why to do automation Testing
What is Selenium ?
Selenium Suite ?
How to configure eclipse for Selenium
How to write first Script
Locator & thier type
CSS Syntax
Working with text & password field, button, link, radio elements
Grouping multiple objects with common property(using findElements)
difference between findElement & findElements 

Assignment:
Count available images on https://opensource-demo.orangehrmlive.com/

Comments