SlideShare a Scribd company logo
SELENIUM
INTRODUCTION 
 Selenium is a suite of tools used for browser 
automation 
 A well organized tool to develop test cases or test 
suites 
 Jason Huggins introduced selenium in 2004 
 It is developed using java scripts 
 It composed of 4 main components 
IDE, Remote Control, Web Driver and Grid 
 A tool to test the web based applications
What it can do? 
 Selenium can test in three regards 
1. Functional 
2. Regression and 
3. Load Testing
THE TECHNICAL CHALLENGES IN SELENIUM 
 Selenium Supports only web based applications 
 It doesn’t support any non web based (Like Win 32, Java Applet, Java Swing, 
.Net Client Server etc) applications 
 When you compare selenium with QTP, Silk Test, Test Partner and RFT, there 
are many challenges in terms of maintainability of the test cases 
 Since Selenium is a freeware tool, there is no direct support if one is in trouble 
with the support of applications 
 There is no object repository concept in Selenium, so maintainability of the 
objects is very high 
 There are many challenges if one have to interact with Win 32 windows even 
when you are working with Web based applications 
 Bitmap comparison is not supported by Selenium 
 Any reporting related capabilities, you need to depend on third party tools 
 You need to learn any one of the native language like (.Net, Java, Perl, Python, 
PHP, Ruby) to work efficiently with the scripting side of selenium.
FLEXIBILITY IN SELENIUM 
 Selenium testing suite is highly flexible. 
 There are multiple ways to add functionality to Selenium 
framework to customize test automation. 
 As compared to other test automation tools, it is Selenium’s 
strongest characteristic. 
 Selenium Remote Control support for multiple 
programming and scripting languages allows the test 
automation engineer to build any logic they need into their 
automated testing and to use a preferred programming or 
scripting language of one’s choice. 
 Also, the Selenium testing suite is an open source project 
where code can be modified and enhancements can be 
submitted for contribution
SELENIUM - IDE 
 Also known as SIDE 
 Helps the developer and tester in a easier way to drive 
the browser in a work flow 
 It is developed with java script 
 It is an Add-on in Mozilla Firefox browser, hence ide 
can work only for FF browser 
 It can export the recorded test cases to webdriver and 
which can runs in many languages like Perl, Php, Java, 
Ruby, C#, Phyton etc.. 
 Functional testing tool
FEATURES - IDE 
 Record or play back features 
 Debugging step by step and breakpoints 
 Page abstraction functionality 
 User extension that expands the functionality of SIDE
ADVANTAGE - IDE 
 Open source tool 
 Easy to install 
 Well organized in developing test cases 
 Exports test cases to many languages and which can be 
used in RC or Web Driver 
 Allows simple DOM- LEVEL testing at the same time it is 
used for traditional water fall model to modern Agile 
methodology 
 Records – Click, typing and other actions to make test 
cases 
 Auto complete for all common Selenium commands 
 Debug and set breakpoints
DISADVANTAGE - IDE 
 Dreary error diagnostics 
 Tests only web applications 
 IDE works with Mozilla Firefox browser only
SELENESE 
 A HTML language to drive the elements in the browser 
 There are three types 
1. Action 
2. Assertion 
3. Accessors 
Action - is used to perform an action or interaction 
with the elements. Eg: open, click, type etc. 
Assertion – to verify or assert the expected value based 
on optional or mandatory 
Accessors – To store a value in a variable
Assertion 
 Assert – If the expected value is matched if continues 
the next test steps. If not it aborts the test. Assert is 
used for the mandatory check. 
Note: While in a test suite it will abort the current test 
case and continue the next test case. 
 Verify – If the expected value is matched if continues 
the next test steps. If not the test execution will 
continue with the remaining steps. Verify is used for 
the optional check.
Accessors 
 To store a value in a variable 
a. To get a value from an element and compare it with the 
dynamic variable 
b. To take logical decisions to execute the test steps 
c. To execute the loops based on the value it returns
Basic Working of SIDE 
SIDE tool components 
Record and play back feature 
Assertions 
Multiple windows and Ajax 
Debugging
Where to get the SIDE 
 Visit http://docs.seleniumhq.org/ 
 Download tab 
 Selenium IDE version 2.5.0 
 You should have installed Mozilla FireFox browser 
 Since it’s a add-on for firefox 
 Once installed go to Tool Selenium IDE 
(or) 
 In the toolbar you can find Selenium IDE icon
SELENIUM IDE TOOL
1. SIDE components 
 Base URL: All open command will be relative to the base 
URL (full path). This is the URL that the test will start at. 
 Speed Slider: This slider is used to fast or slow mode 
during the play back. 
 (Triangle with 3 lines): Run all the tests in the id 
 (Triangle with 1 line): Run only single test 
 (||): Pause a test that is currently running 
 (bended down arrow): Step through the test once it has 
paused 
 Red button- This is the Record button. By default when 
we open the selenium IDE it will be enabled
Cont.. 
 Command - It is a select box has a list of all the 
commands that are needed to create the test. It is an auto 
complete functionality or use the drop down. 
 Target - the location of the element 
 Value - where you place the value that needs to be change. 
 Table view – Will keep track all the commands, targets 
and values. 
 Source View – You will be able to see the HTML that will 
store the test 
 Log – will show what is happening during the test run. 
 Reference – Documentation on the command highlighted
2. Record and Play back 
 Open Mozilla Firefox browser and Selenium IDE 
 By default the record mode is on 
 Write the URL in the Base Url 
 Now what ever you do in the browser those will be 
recorded in the SIDE 
 Once done stop recording and playback it 
 It will play you back the same action what u have done 
during recording.
3. Assertion 
 Assertion is a check point or verification point to verify 
 The two types are ASSERT and VERIFY 
 While recording when you right on any element you 
could find it in the show all available command 
assert and verify. 
 While playback it is going to verify the select action 
 The verified command will be glowing dark green in 
color.
Pattern Matching 
 The pattern matching is plays a vital role in when we 
use verify and assert 
 The three major types of pattern matching are 
1. GLOBBING 
2. EXACT 
3. REGULAR EXPRESSION 
 Globbing is handled with ? and * - glob: 
 Exact is used to match the exact word – exact: 
 Regular expression is used with the keyword regexp:
Examples… 
 While you verify or assert in the value specify the 
pattern match 
Eg: word id cool which is a dynamically changing 
element like pool, mool and fool 
Value - glob: ?ool 
Which accepts any alphabet in the ?’s space 
 Exact is the exact word match 
Eg: 
Value – exact: cool 
Which accepts only cool.
Regular expression 
 Consider this example 
2011-05-02451 
In value - regexp:[0-9]{4}-[0-9]{2}-[0-9]{5,10} 
So, 2011 all numeric and have 4 char so [0-9]{4} 
If a text is there: hi this is Selenium 
In Value : [a-z]{2} for hi 
[A-Z][a-z]{7}  Selenium 
Or [A-Z].* Selenium 
* Will accept the remaining alphabets.
4. Multiple window and AJAX 
1. As we test a page in the same way we can test all the 
elements on a another page 
 When we click the link for multiple window it may 
take time to load the page in the different window at 
that time we need to tell selenium to wait using the 
command “click and wait” 
2. Ajax is going to load the action at the same page 
 Selenium do not know when does it load? At this time 
we need to use “wait for the element”
Multiple windows 
 Open the IDE 
 Launch http://theautomatedtester.co.uk/ 
 Click on Chapter 1 
 Click on the element “Click this to launch another 
window” 
 A small window will appear where you can even verify 
the text.
Ajax 
 Open the IDE 
 Launch http://theautomatedtester.co.uk/ 
 Click on Chapter 1 
 Click on the element “Click this link to load a page 
with AJAX” 
 On the same page ajax action will be loaded and we 
can verify the text
5. Debugging 
 It is not necessary to test the whole test cases 
 We can debug the single or particular command 
whether it is working as expected 
 Three types of debugging 
1. Double click on the command 
2. Right click on the command and select execute this 
command or Click on the command press “X” 
3. Toggle breakpoint press ‘B’ on the command 
Note: while debugging make sure the browser is opened 
with the URL you are testing
Accessors 
 How to store value in a variable? 
1. Open the IDE and launch the site : 
http://book.theautomatedtester.co.uk/Chapter1 
2. Right click on any text that you need to store in the text box available 
in the page 
3. Select store Text 
4. A dialog box will appear and ask you to enter the name of the variable 
5. Enter a variable name eg: abc 
6. Now stop recording 
7. Click on the next blank step where the steps are recording 
8. Command: Type 
9. Target: storeinput //{which the id of the textbox} 
10. Value: ${abc} 
11. Now run the test 
12. You can view the selected text in the text box.
How it works? 
 We are recording and playing it back fine but how does it 
works or how does it verify the particular element in the 
page? 
 The selenium IDE is going to find the elements using 
Locators 
 The fire bug and fire path add-on’s must be installed in 
firefox which will be helpful for this session. (F12) 
 The different kinds of locators are 
 Id 
 Name 
 CSS or Class name 
 Link 
 Xpath
ID 
 A good developer will create the unique ID for each 
elements in the page 
 Id is mostly used and also easy to use to locate the element 
 Example for user name and password’s id in gmail account 
 <input id="Email" class="" type="email" spellcheck="false" 
value="" placeholder="Email" name="Email"> 
 <label class="hidden-label" 
for="Passwd">Password</label> 
 <input id="Passwd" class="" type="password" placeholder= 
"Password" name="Passwd"> 
 Using locator in the fire bug you could get the above details
Name 
 Name 
 <input id="signIn" class="rc-button rc-button-submit" 
type="submit" value="Sign 
in" name="signIn">
CSS 
 The syntax is CSS= cssSelector 
 Example: 
 Open IDE 
 Open the site 
(http://book.theautomatedtester.co.uk/chapter2) 
 Click on firefinder
Cont.. 
 <div id="divontheleft" class="leftdiv"> 
 <input id="but1" type="button" value="Button with 
ID"></input> 
 (two buttons Button with ID and Sibling Button are 
inside the div. Id is divontheleft and class is leftdiv) 
 Now in the firefinder enter div.leftdiv input 
 In selenium IDE, Target= (css=div.leftdiv input) 
 Click on find which will highlight the respective 
button
Link 
 The easiest way to find the link 
 In the target: link=(link) 
 Example 
 http://book.theautomatedtester.co.uk/chapter1 
 Here open http://book.theautomatedtester.co.uk 
 Then in target to open the chapter 1 
 Type: link=Chapter 1 
Note: the same format should be given. We should not 
give lower or upper as our wish..
Xpath 
 There are two types of X path – 
1. Complete or Absolute 
2. partial 
 Most partial is preferred since tomorrow if there are any changes 
it will be difficult to go with absolute. You will know it why ? 
 Let me differentiate it for the element SIGN IN 
 example for absolute path 
html/body/div[1]/div[2]/div[2]/form/input[16] 
 Example for partial path 
.//*[@id='signIn'] 
Note: If suppose any changes happens in any division it could not 
find the exact path hence partial is mostly preferred.
THE END

More Related Content

What's hot

Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Simplilearn
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
Return on Intelligence
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
 
SELENIUM PPT.pdf
SELENIUM PPT.pdfSELENIUM PPT.pdf
SELENIUM PPT.pdf
RebelSnowball
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Anirudh Raja
 
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Simplilearn
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
Zeba Tahseen
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
Pankaj Biswas
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
Weifeng Zhang
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
Cynoteck Technology Solutions Private Limited
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Naga Dinesh
 
Selenium
SeleniumSelenium
Selenium
Batch2016
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Simplilearn
 
Test Automation Using Python | Edureka
Test Automation Using Python | EdurekaTest Automation Using Python | Edureka
Test Automation Using Python | Edureka
Edureka!
 
Selenium WebDriver training
Selenium WebDriver trainingSelenium WebDriver training
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 

What's hot (20)

Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
SELENIUM PPT.pdf
SELENIUM PPT.pdfSELENIUM PPT.pdf
SELENIUM PPT.pdf
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Selenium
SeleniumSelenium
Selenium
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
Test Automation Using Python | Edureka
Test Automation Using Python | EdurekaTest Automation Using Python | Edureka
Test Automation Using Python | Edureka
 
Selenium WebDriver training
Selenium WebDriver trainingSelenium WebDriver training
Selenium WebDriver training
 

Similar to Selenium ppt

Selenium introduction and some feautures
Selenium introduction and some feauturesSelenium introduction and some feautures
Selenium introduction and some feautures
zahid32
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
b4usolution .
 
Selenium IDE and Extensions
Selenium IDE and ExtensionsSelenium IDE and Extensions
Selenium IDE and ExtensionsYana Altunyan
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ide
Testertester Jaipur
 
Selenium
SeleniumSelenium
Seleniumnil65
 
Steps to write Selenium
Steps to write Selenium  Steps to write Selenium
Steps to write Selenium Rohit Thakur
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
Jodie Miners
 
Selenium ide made easy
Selenium ide made easySelenium ide made easy
Selenium ide made easy
Narayanan Palani
 
Selenium by using JAVA
Selenium by using JAVASelenium by using JAVA
Selenium by using JAVA
mahirayavarapu
 
Selenium testing IDE 101
Selenium testing IDE 101Selenium testing IDE 101
Selenium testing IDE 101
Adam Culp
 
Selenium Basics by Quontra Solutions
Selenium Basics by Quontra SolutionsSelenium Basics by Quontra Solutions
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
 
What is selenium
What is seleniumWhat is selenium
What is selenium
sachin patil
 
Selenium training
Selenium trainingSelenium training
Selenium trainingRobin0590
 
Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorialprad_123
 
Introduction to Selenium
Introduction to SeleniumIntroduction to Selenium
Introduction to Selenium
Knoldus Inc.
 
SKILLWISE_SELENIUM
SKILLWISE_SELENIUMSKILLWISE_SELENIUM
SKILLWISE_SELENIUM
Skillwise Consulting
 

Similar to Selenium ppt (20)

Selenium introduction and some feautures
Selenium introduction and some feauturesSelenium introduction and some feautures
Selenium introduction and some feautures
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Selenium IDE and Extensions
Selenium IDE and ExtensionsSelenium IDE and Extensions
Selenium IDE and Extensions
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ide
 
Selenium
SeleniumSelenium
Selenium
 
Steps to write Selenium
Steps to write Selenium  Steps to write Selenium
Steps to write Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
 
Sel
SelSel
Sel
 
Selenium Testing
Selenium Testing Selenium Testing
Selenium Testing
 
Selenium ide made easy
Selenium ide made easySelenium ide made easy
Selenium ide made easy
 
What is selenium
What is seleniumWhat is selenium
What is selenium
 
Selenium by using JAVA
Selenium by using JAVASelenium by using JAVA
Selenium by using JAVA
 
Selenium testing IDE 101
Selenium testing IDE 101Selenium testing IDE 101
Selenium testing IDE 101
 
Selenium Basics by Quontra Solutions
Selenium Basics by Quontra SolutionsSelenium Basics by Quontra Solutions
Selenium Basics by Quontra Solutions
 
What is selenium
What is seleniumWhat is selenium
What is selenium
 
Selenium training
Selenium trainingSelenium training
Selenium training
 
Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorial
 
Introduction to Selenium
Introduction to SeleniumIntroduction to Selenium
Introduction to Selenium
 
SKILLWISE_SELENIUM
SKILLWISE_SELENIUMSKILLWISE_SELENIUM
SKILLWISE_SELENIUM
 

Recently uploaded

Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 

Recently uploaded (20)

Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 

Selenium ppt

  • 2. INTRODUCTION  Selenium is a suite of tools used for browser automation  A well organized tool to develop test cases or test suites  Jason Huggins introduced selenium in 2004  It is developed using java scripts  It composed of 4 main components IDE, Remote Control, Web Driver and Grid  A tool to test the web based applications
  • 3. What it can do?  Selenium can test in three regards 1. Functional 2. Regression and 3. Load Testing
  • 4. THE TECHNICAL CHALLENGES IN SELENIUM  Selenium Supports only web based applications  It doesn’t support any non web based (Like Win 32, Java Applet, Java Swing, .Net Client Server etc) applications  When you compare selenium with QTP, Silk Test, Test Partner and RFT, there are many challenges in terms of maintainability of the test cases  Since Selenium is a freeware tool, there is no direct support if one is in trouble with the support of applications  There is no object repository concept in Selenium, so maintainability of the objects is very high  There are many challenges if one have to interact with Win 32 windows even when you are working with Web based applications  Bitmap comparison is not supported by Selenium  Any reporting related capabilities, you need to depend on third party tools  You need to learn any one of the native language like (.Net, Java, Perl, Python, PHP, Ruby) to work efficiently with the scripting side of selenium.
  • 5. FLEXIBILITY IN SELENIUM  Selenium testing suite is highly flexible.  There are multiple ways to add functionality to Selenium framework to customize test automation.  As compared to other test automation tools, it is Selenium’s strongest characteristic.  Selenium Remote Control support for multiple programming and scripting languages allows the test automation engineer to build any logic they need into their automated testing and to use a preferred programming or scripting language of one’s choice.  Also, the Selenium testing suite is an open source project where code can be modified and enhancements can be submitted for contribution
  • 6. SELENIUM - IDE  Also known as SIDE  Helps the developer and tester in a easier way to drive the browser in a work flow  It is developed with java script  It is an Add-on in Mozilla Firefox browser, hence ide can work only for FF browser  It can export the recorded test cases to webdriver and which can runs in many languages like Perl, Php, Java, Ruby, C#, Phyton etc..  Functional testing tool
  • 7. FEATURES - IDE  Record or play back features  Debugging step by step and breakpoints  Page abstraction functionality  User extension that expands the functionality of SIDE
  • 8. ADVANTAGE - IDE  Open source tool  Easy to install  Well organized in developing test cases  Exports test cases to many languages and which can be used in RC or Web Driver  Allows simple DOM- LEVEL testing at the same time it is used for traditional water fall model to modern Agile methodology  Records – Click, typing and other actions to make test cases  Auto complete for all common Selenium commands  Debug and set breakpoints
  • 9. DISADVANTAGE - IDE  Dreary error diagnostics  Tests only web applications  IDE works with Mozilla Firefox browser only
  • 10. SELENESE  A HTML language to drive the elements in the browser  There are three types 1. Action 2. Assertion 3. Accessors Action - is used to perform an action or interaction with the elements. Eg: open, click, type etc. Assertion – to verify or assert the expected value based on optional or mandatory Accessors – To store a value in a variable
  • 11. Assertion  Assert – If the expected value is matched if continues the next test steps. If not it aborts the test. Assert is used for the mandatory check. Note: While in a test suite it will abort the current test case and continue the next test case.  Verify – If the expected value is matched if continues the next test steps. If not the test execution will continue with the remaining steps. Verify is used for the optional check.
  • 12. Accessors  To store a value in a variable a. To get a value from an element and compare it with the dynamic variable b. To take logical decisions to execute the test steps c. To execute the loops based on the value it returns
  • 13. Basic Working of SIDE SIDE tool components Record and play back feature Assertions Multiple windows and Ajax Debugging
  • 14. Where to get the SIDE  Visit http://docs.seleniumhq.org/  Download tab  Selenium IDE version 2.5.0  You should have installed Mozilla FireFox browser  Since it’s a add-on for firefox  Once installed go to Tool Selenium IDE (or)  In the toolbar you can find Selenium IDE icon
  • 16. 1. SIDE components  Base URL: All open command will be relative to the base URL (full path). This is the URL that the test will start at.  Speed Slider: This slider is used to fast or slow mode during the play back.  (Triangle with 3 lines): Run all the tests in the id  (Triangle with 1 line): Run only single test  (||): Pause a test that is currently running  (bended down arrow): Step through the test once it has paused  Red button- This is the Record button. By default when we open the selenium IDE it will be enabled
  • 17. Cont..  Command - It is a select box has a list of all the commands that are needed to create the test. It is an auto complete functionality or use the drop down.  Target - the location of the element  Value - where you place the value that needs to be change.  Table view – Will keep track all the commands, targets and values.  Source View – You will be able to see the HTML that will store the test  Log – will show what is happening during the test run.  Reference – Documentation on the command highlighted
  • 18. 2. Record and Play back  Open Mozilla Firefox browser and Selenium IDE  By default the record mode is on  Write the URL in the Base Url  Now what ever you do in the browser those will be recorded in the SIDE  Once done stop recording and playback it  It will play you back the same action what u have done during recording.
  • 19. 3. Assertion  Assertion is a check point or verification point to verify  The two types are ASSERT and VERIFY  While recording when you right on any element you could find it in the show all available command assert and verify.  While playback it is going to verify the select action  The verified command will be glowing dark green in color.
  • 20. Pattern Matching  The pattern matching is plays a vital role in when we use verify and assert  The three major types of pattern matching are 1. GLOBBING 2. EXACT 3. REGULAR EXPRESSION  Globbing is handled with ? and * - glob:  Exact is used to match the exact word – exact:  Regular expression is used with the keyword regexp:
  • 21. Examples…  While you verify or assert in the value specify the pattern match Eg: word id cool which is a dynamically changing element like pool, mool and fool Value - glob: ?ool Which accepts any alphabet in the ?’s space  Exact is the exact word match Eg: Value – exact: cool Which accepts only cool.
  • 22. Regular expression  Consider this example 2011-05-02451 In value - regexp:[0-9]{4}-[0-9]{2}-[0-9]{5,10} So, 2011 all numeric and have 4 char so [0-9]{4} If a text is there: hi this is Selenium In Value : [a-z]{2} for hi [A-Z][a-z]{7} Selenium Or [A-Z].* Selenium * Will accept the remaining alphabets.
  • 23. 4. Multiple window and AJAX 1. As we test a page in the same way we can test all the elements on a another page  When we click the link for multiple window it may take time to load the page in the different window at that time we need to tell selenium to wait using the command “click and wait” 2. Ajax is going to load the action at the same page  Selenium do not know when does it load? At this time we need to use “wait for the element”
  • 24. Multiple windows  Open the IDE  Launch http://theautomatedtester.co.uk/  Click on Chapter 1  Click on the element “Click this to launch another window”  A small window will appear where you can even verify the text.
  • 25. Ajax  Open the IDE  Launch http://theautomatedtester.co.uk/  Click on Chapter 1  Click on the element “Click this link to load a page with AJAX”  On the same page ajax action will be loaded and we can verify the text
  • 26. 5. Debugging  It is not necessary to test the whole test cases  We can debug the single or particular command whether it is working as expected  Three types of debugging 1. Double click on the command 2. Right click on the command and select execute this command or Click on the command press “X” 3. Toggle breakpoint press ‘B’ on the command Note: while debugging make sure the browser is opened with the URL you are testing
  • 27. Accessors  How to store value in a variable? 1. Open the IDE and launch the site : http://book.theautomatedtester.co.uk/Chapter1 2. Right click on any text that you need to store in the text box available in the page 3. Select store Text 4. A dialog box will appear and ask you to enter the name of the variable 5. Enter a variable name eg: abc 6. Now stop recording 7. Click on the next blank step where the steps are recording 8. Command: Type 9. Target: storeinput //{which the id of the textbox} 10. Value: ${abc} 11. Now run the test 12. You can view the selected text in the text box.
  • 28. How it works?  We are recording and playing it back fine but how does it works or how does it verify the particular element in the page?  The selenium IDE is going to find the elements using Locators  The fire bug and fire path add-on’s must be installed in firefox which will be helpful for this session. (F12)  The different kinds of locators are  Id  Name  CSS or Class name  Link  Xpath
  • 29. ID  A good developer will create the unique ID for each elements in the page  Id is mostly used and also easy to use to locate the element  Example for user name and password’s id in gmail account  <input id="Email" class="" type="email" spellcheck="false" value="" placeholder="Email" name="Email">  <label class="hidden-label" for="Passwd">Password</label>  <input id="Passwd" class="" type="password" placeholder= "Password" name="Passwd">  Using locator in the fire bug you could get the above details
  • 30. Name  Name  <input id="signIn" class="rc-button rc-button-submit" type="submit" value="Sign in" name="signIn">
  • 31. CSS  The syntax is CSS= cssSelector  Example:  Open IDE  Open the site (http://book.theautomatedtester.co.uk/chapter2)  Click on firefinder
  • 32. Cont..  <div id="divontheleft" class="leftdiv">  <input id="but1" type="button" value="Button with ID"></input>  (two buttons Button with ID and Sibling Button are inside the div. Id is divontheleft and class is leftdiv)  Now in the firefinder enter div.leftdiv input  In selenium IDE, Target= (css=div.leftdiv input)  Click on find which will highlight the respective button
  • 33. Link  The easiest way to find the link  In the target: link=(link)  Example  http://book.theautomatedtester.co.uk/chapter1  Here open http://book.theautomatedtester.co.uk  Then in target to open the chapter 1  Type: link=Chapter 1 Note: the same format should be given. We should not give lower or upper as our wish..
  • 34. Xpath  There are two types of X path – 1. Complete or Absolute 2. partial  Most partial is preferred since tomorrow if there are any changes it will be difficult to go with absolute. You will know it why ?  Let me differentiate it for the element SIGN IN  example for absolute path html/body/div[1]/div[2]/div[2]/form/input[16]  Example for partial path .//*[@id='signIn'] Note: If suppose any changes happens in any division it could not find the exact path hence partial is mostly preferred.