SlideShare una empresa de Scribd logo
1 de 38
IDE OverviewIDE Overview
SeleniumSelenium
HP Web Test Tool TrainingHP Web Test Tool Training
Mindq systemsMindq systems
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
22
Selenium OverviewSelenium Overview
Selenium IDE IntroductionSelenium IDE Introduction
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
What is Test Automation?What is Test Automation?
 A process of writing a computer program to doA process of writing a computer program to do
testing that would otherwise need to be donetesting that would otherwise need to be done
manuallymanually
 Use of software to control the execution of testsUse of software to control the execution of tests
Two types of test automation:Two types of test automation:
 Code-driven testingCode-driven testing
 Graphical user interface testingGraphical user interface testing
33www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Advantages of AutomationAdvantages of Automation
 Reliable: Tests perform precisely the same operationsTests perform precisely the same operations
each time they are run, thereby eliminating human error.each time they are run, thereby eliminating human error.
 Repeatable: You can test how the software reacts underYou can test how the software reacts under
repeated execution of the same operations.repeated execution of the same operations.
 Reusable: You can reuse tests on different versions ofYou can reuse tests on different versions of
an application, even if the user interface changes.an application, even if the user interface changes.
 Speed: Run tests significantly faster than human users.Run tests significantly faster than human users.
 Cost Reduction: As the number of resources forAs the number of resources for
regression test are reduced.regression test are reduced.
 Better Quality Software: Rapid feedback to developersRapid feedback to developers
during the development process as a result of frequentduring the development process as a result of frequent
regression testing.regression testing.
44www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Disadvantages of AutomationDisadvantages of Automation
 Proficiency is required to write the automation test script.Proficiency is required to write the automation test script.
 Debugging the test script is major issue. If any error isDebugging the test script is major issue. If any error is
present in the test script, sometimes it may lead to dadlypresent in the test script, sometimes it may lead to dadly
consequences.consequences.
 Test maintenance is costly in case of playback methods.Test maintenance is costly in case of playback methods.
Even though a minor changes occurs in the GUI, the testEven though a minor changes occurs in the GUI, the test
script has to be rewritten.script has to be rewritten.
 Maintenance of test data files is difficult, if the test scriptMaintenance of test data files is difficult, if the test script
tests more screens or web-pages.tests more screens or web-pages.
 Short iteration or very tight deadline, there is not enough
time to build test automation.
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
What is Selenium?What is Selenium?
A set of tools that supports rapid development of testA set of tools that supports rapid development of test
automation for web-based applications.automation for web-based applications.
 Can be recorded and written as HTMLCan be recorded and written as HTML
 Support for a number of programming languages: Java,Support for a number of programming languages: Java,
C#, Perl, PHP, Python, RubyC#, Perl, PHP, Python, Ruby
 Cross browsers support: IE, Firefox, Opera, Safari andCross browsers support: IE, Firefox, Opera, Safari and
Google ChromeGoogle Chrome
 Cross platform support: Windows, Linux, and Macintosh.Cross platform support: Windows, Linux, and Macintosh.
66www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
 Invented in 2004 by Jason R. Huggins and team.Invented in 2004 by Jason R. Huggins and team.
 Originally named JavaScript Functional Tester [JSFT]Originally named JavaScript Functional Tester [JSFT]
 100% Javascript and HTML100% Javascript and HTML
 Designed to make test writing easyDesigned to make test writing easy
 Open source browser based integration test frameworkOpen source browser based integration test framework
built originally by ThoughtWorksbuilt originally by ThoughtWorks
 Selenium is open source software, released under theSelenium is open source software, released under the
Apache 2.0 license and can be downloaded and usedApache 2.0 license and can be downloaded and used
without charge.without charge.
Selenium BackgroundSelenium Background
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Selenium TriviaSelenium Trivia
88
Selenium is a chemical element with the atomic number 34,
represented by the chemical symbol Se.
Selenium is used for treating Mercury
poisoning
Products: QTP, WinRunner, LoadRunner and TestDirector
Selenium
Mercury
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Selenium ComponentsSelenium Components
 Selenium IDESelenium IDE
 Selenium RCSelenium RC
 Selenium GridSelenium Grid
 Selenium2 akaSelenium2 aka
WebdriverWebdriver
99
< < Selenium Core< < Selenium Core
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Selenium IDESelenium IDE
 Selenium IDE (SIDE) is a complete IntegratedSelenium IDE (SIDE) is a complete Integrated
Development Environment (IDE) for building SeleniumDevelopment Environment (IDE) for building Selenium
test case.test case.
 Firefox add-on that makes it easy to record, edit, andFirefox add-on that makes it easy to record, edit, and
debug tests.debug tests.
 Provides an easy-to-use interface for developing andProvides an easy-to-use interface for developing and
running individual test cases or entire test suites.running individual test cases or entire test suites.
 Can be used to generate code to run the tests withCan be used to generate code to run the tests with
Selenium Remote Control (RC).Selenium Remote Control (RC).
1010www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Selenium IDE FeaturesSelenium IDE Features
 Record, playback, edit
 Intelligent component identification will use object IDs,
names, or XPath as needed
 Auto complete for all common Selenium commands
 Walk through test cases and test suites.
 Debug and set breakpoints
 Save tests as HTML, or export as other supported
programming languages
 Support for Selenium user extensions
1111www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
1212
Installing Selenium IDEInstalling Selenium IDE
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Installing Selenium IDEInstalling Selenium IDE
1313
Two step process:
 Step 1. Check if Firefox is installed
1a. If Firefox is not installed on your machine then
Install Firefox
(There is NO IE Version of Selenium)(There is NO IE Version of Selenium)
 Step 2. Check if Selenium IDE is installed)
2a. If Selenium IDE is not installed on your machine
then Install Selenium IDE Plug In
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 1: Is Firefox Installed?Step 1: Is Firefox Installed?
 Check whether your machine already has a version ofCheck whether your machine already has a version of
Firefox installed.Firefox installed.
 Go to StartGo to Start  ProgramsPrograms  Mozilla FirefoxMozilla Firefox
1414www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 1: Check Firefox VersionStep 1: Check Firefox Version
 Click on the Mozilla FirefoxClick on the Mozilla Firefox
 Go to HelpGo to Help  About as shown below:About as shown below:
 Check the version nameCheck the version name
 What is your version?What is your version?
1515
Must be Firefox
version 3.x.x.xx
not 4.x.x.xx
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 1a: Firefox InstallationStep 1a: Firefox Installation
 Open your IE browser (or any other browser)Open your IE browser (or any other browser)
 Navigate to Firefox 3.6 download link.Navigate to Firefox 3.6 download link.
http://www.oldapps.com/firefox.php?old_firefox=109?downloadhttp://www.oldapps.com/firefox.php?old_firefox=109?download
WARNING!!!!!WARNING!!!!!
 Mozilla website will not haveMozilla website will not have
Firefox 3.6 download link.Firefox 3.6 download link.
The most current browser version will be presented.The most current browser version will be presented.
(FF 4.0)(FF 4.0)
1616www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 1a: Firefox InstallationStep 1a: Firefox Installation
1717www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 1a: Firefox InstallationStep 1a: Firefox Installation
 Follow the steps and run the program (*1)Follow the steps and run the program (*1)
(Saving into local machine then running is recommended)(Saving into local machine then running is recommended)
 If prompted with Security warning, press “Run” button (*2If prompted with Security warning, press “Run” button (*2
& *3)& *3)
1818
*1
*2
*3
Save into your local machine.
(C:Downloads)
Run (double click Firefox Setup
3.x.x) from the location where
you downloaded
Ignore Security warning and press
“Run” button
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 1a: Firefox InstallationStep 1a: Firefox Installation
 Press Next (*1)Press Next (*1)
 Check the “I Accept” then Press Next (*2)Check the “I Accept” then Press Next (*2)
 Select Standard, Remove check from “Use Firefox as mySelect Standard, Remove check from “Use Firefox as my
default browser” (*3)default browser” (*3)
 Press Install button (*4)Press Install button (*4)
 Press Finish button (*5)Press Finish button (*5)
1919
*1
*2 *3
*4
*5
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 2: Is Selenium IDE Installed?Step 2: Is Selenium IDE Installed?
 Open the Firefox browser window (*1)Open the Firefox browser window (*1)
 Go to ToolsGo to Tools  Check whether Selenium IDE alreadyCheck whether Selenium IDE already
exist there (*2)exist there (*2)
 If you see “Selenium IDE” then you already havingIf you see “Selenium IDE” then you already having
Selenium IDE plug-in installed in Firefox browser.Selenium IDE plug-in installed in Firefox browser.
 If not installed then follow the instruction on the next slideIf not installed then follow the instruction on the next slide
2020
*1 *2
Check whether
Selenium IDE is
already installed
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 2a: Installing Selenium IDEStep 2a: Installing Selenium IDE
 Open the Firefox browser windowOpen the Firefox browser window
 In the navigation tool bar type the below URL:In the navigation tool bar type the below URL:
http://seleniumhq.org/download/http://seleniumhq.org/download/
 Click the Download link next to Selenium IDE projectClick the Download link next to Selenium IDE project
name.name.
2121
Don’t do this in IE
Click Download
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 2a: Installing Selenium IDEStep 2a: Installing Selenium IDE
2222
Or you can find Selenium IDE
downloads in Previous Releases
directory:
1. Previous
Releases
2. Selenium
IDE
3. Version
1.0.10
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 2a: Installing Selenium IDEStep 2a: Installing Selenium IDE
 When the Software Installation Window opens selectWhen the Software Installation Window opens select
“selenium-ide” (*1)“selenium-ide” (*1)
 Click Install Now buttonClick Install Now button
 ““Selenium IDE” add-on is installed (*2)Selenium IDE” add-on is installed (*2)
 Click on “Restart Firefox” buttonClick on “Restart Firefox” button
2323
*1 *2
Restart Firefox for
Selenium Plug-in to
take effect
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Step 2a: Installing Selenium IDEStep 2a: Installing Selenium IDE
In the Firefox browser go to Tools and verify whetherIn the Firefox browser go to Tools and verify whether
“Selenium IDE” is displayed.“Selenium IDE” is displayed.
Congratulation!
Selenium IDE installation is completed.Selenium IDE installation is completed.
2424
Selenium IDE is
successfully installed
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
2525
Recording and RunningRecording and Running
Selenium TestsSelenium Tests
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Test Case #1: LoginTest Case #1: Login
Test-Case Objective:
Ensure Valid User Login
Expected Result:Expected Result:
1.OrangeHRM index page
is loaded
2.Correct username is
displayed as part of the
greeting.
“Welcome Admin”
2626
Steps :
1. In the login textbox type
“admin”.
2. In the password textbox
type “password”.
3. Click “Submit” button
4. Verify that a correct
user name is displayed
5. Log out
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Test Script #1: LoginTest Script #1: Login
Test Script Steps:Test Script Steps:
Open OrangeHRM application in FirefoxOpen OrangeHRM application in Firefox
http://hrm.phttp://hrm.portnov.comortnov.com
 Login using :Login using :
Login Name: adminLogin Name: admin
Password: passwordPassword: password
 Click Login buttonClick Login button
 Highlight “Welcome Admin” textHighlight “Welcome Admin” text
 Right-click and select VerifyTextPresentRight-click and select VerifyTextPresent
 Click logout linkClick logout link
2727www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Recording An Automated TestRecording An Automated Test
1.1. Open OrangeHRM application in FirefoxOpen OrangeHRM application in Firefox
http://hrm.portnov.comhttp://hrm.portnov.com (*1)(*1)
2.2. Open Selenium IDE in FirefoxOpen Selenium IDE in Firefox
Go to ToolsGo to Tools  Selenium IDE (*2)Selenium IDE (*2)
2828
*2*1
The Record
button is ON by
default
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Login TestLogin Test
 Make sure Record button is ON!Make sure Record button is ON!
 Go to the Browser windowGo to the Browser window
 Login using (*2):Login using (*2):
Login Name: adminLogin Name: admin
Password: passwordPassword: password
 Click Login buttonClick Login button
2929
*1
*2
The Record button is
ON by default
Login Name: admin
Password: password
Then click Login button
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Login TestLogin Test
 Highlight “Welcome Admin” text (*1)Highlight “Welcome Admin” text (*1)
 Right-click and selectRight-click and select VerifyTextPresentVerifyTextPresent (*2)(*2)
 Click logout linkClick logout link
3030
*1
*2
Highlight “Welcome
demo”
Select
VerifyTextPresent
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Stop RecordingStop Recording
Go to Selenium IDEGo to Selenium IDE
Click the red button to STOP recordingClick the red button to STOP recording
All your actions are recorded and displayed sequentiallyAll your actions are recorded and displayed sequentially
under Command Table Tabunder Command Table Tab
3131
Click here to Stop
recording
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
What did we accomplish?What did we accomplish?
Manual Test-Case
Test-Case ObjectiveTest-Case Objective
Ensure Valid User LoginEnsure Valid User Login
StepsSteps
 In the login textbox typeIn the login textbox type
admin.admin.
 In the password textbox typeIn the password textbox type
password.password.
 Click Submit buttonClick Submit button
 Verify that a correct user nameVerify that a correct user name
is displayedis displayed
 LogoutLogout
Expected ResultExpected Result
1)1) OrangeHRM index page isOrangeHRM index page is
loadedloaded
2)2) Correct username is displayedCorrect username is displayed
as part of the greeting.as part of the greeting.
““Welcome Admin”Welcome Admin”
Automated Test-Case
3232
We created our first automated test scriptWe created our first automated test script
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Running Selenium Automated TestRunning Selenium Automated Test
Make sure the Firefox browser is still openMake sure the Firefox browser is still open
Go to Selenium IDE and clickGo to Selenium IDE and click ““Play current test case””
buttonbutton
3333
*1 *2
Click to play
the Test Case
Make the test case
playback in slow
mode
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Interpreting ColorsInterpreting Colors
 If you see all the command line rows turnIf you see all the command line rows turn GreenGreen color,color,
then the test has passed.then the test has passed.
 Light Green means the code executed without problems.Light Green means the code executed without problems.
 Dark GreenDark Green means the test result of the commandmeans the test result of the command
evaluated toevaluated to truetrue..
 If any part of the test failed it will be shown withIf any part of the test failed it will be shown with RedRed
color.color.
3434www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
DebuggingDebugging
Examine the result of the script.Examine the result of the script.
3535
Time is needed to validate the login information…Time is needed to validate the login information…
The test mustThe test must WAITWAIT for the next web page to loadfor the next web page to load
before proceeding.before proceeding.
What went
wrong?
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Debugging TipsDebugging Tips
 Open Selenium IDE through Tools menu,Open Selenium IDE through Tools menu,
otherwise the IDE may freeze and actotherwise the IDE may freeze and act
unpredictably.unpredictably.
 Make sure you substitute click command withMake sure you substitute click command with
clickAndWait command wherever needed.clickAndWait command wherever needed.
3636www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
EditingEditing
EditingEditing to add wait timeto add wait time to the scriptto the script
1.1. Click the 3rd to last row whereClick the 3rd to last row where ClickAClickA command iscommand is
locatedlocated
2.2. Modify the command fieldModify the command field
 Replace “click” withReplace “click” with “clickAndWait”“clickAndWait” commandcommand
3.3. Re-play the test…Re-play the test…
3737
Click this row
Select clickAndWait
command
www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
Helpful Notes:Helpful Notes:
 One Firefox browser window must be open.One Firefox browser window must be open.
 Multiple browser windows will confuse Selenium.Multiple browser windows will confuse Selenium.
 Play back every automated test to ensure expectedPlay back every automated test to ensure expected
behavior.behavior.
 Keep playback inKeep playback in slowslow mode when debugging.mode when debugging.
 Placing Browser window and Selenium IDE windowsPlacing Browser window and Selenium IDE windows
side by side is a convenient way of tracking testside by side is a convenient way of tracking test
execution step by step.execution step by step.
3838www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info

Más contenido relacionado

Último

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Último (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Selenium intro part1 ide overview

  • 1. IDE OverviewIDE Overview SeleniumSelenium HP Web Test Tool TrainingHP Web Test Tool Training Mindq systemsMindq systems www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 2. 22 Selenium OverviewSelenium Overview Selenium IDE IntroductionSelenium IDE Introduction www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 3. What is Test Automation?What is Test Automation?  A process of writing a computer program to doA process of writing a computer program to do testing that would otherwise need to be donetesting that would otherwise need to be done manuallymanually  Use of software to control the execution of testsUse of software to control the execution of tests Two types of test automation:Two types of test automation:  Code-driven testingCode-driven testing  Graphical user interface testingGraphical user interface testing 33www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 4. Advantages of AutomationAdvantages of Automation  Reliable: Tests perform precisely the same operationsTests perform precisely the same operations each time they are run, thereby eliminating human error.each time they are run, thereby eliminating human error.  Repeatable: You can test how the software reacts underYou can test how the software reacts under repeated execution of the same operations.repeated execution of the same operations.  Reusable: You can reuse tests on different versions ofYou can reuse tests on different versions of an application, even if the user interface changes.an application, even if the user interface changes.  Speed: Run tests significantly faster than human users.Run tests significantly faster than human users.  Cost Reduction: As the number of resources forAs the number of resources for regression test are reduced.regression test are reduced.  Better Quality Software: Rapid feedback to developersRapid feedback to developers during the development process as a result of frequentduring the development process as a result of frequent regression testing.regression testing. 44www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 5. Disadvantages of AutomationDisadvantages of Automation  Proficiency is required to write the automation test script.Proficiency is required to write the automation test script.  Debugging the test script is major issue. If any error isDebugging the test script is major issue. If any error is present in the test script, sometimes it may lead to dadlypresent in the test script, sometimes it may lead to dadly consequences.consequences.  Test maintenance is costly in case of playback methods.Test maintenance is costly in case of playback methods. Even though a minor changes occurs in the GUI, the testEven though a minor changes occurs in the GUI, the test script has to be rewritten.script has to be rewritten.  Maintenance of test data files is difficult, if the test scriptMaintenance of test data files is difficult, if the test script tests more screens or web-pages.tests more screens or web-pages.  Short iteration or very tight deadline, there is not enough time to build test automation. www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 6. What is Selenium?What is Selenium? A set of tools that supports rapid development of testA set of tools that supports rapid development of test automation for web-based applications.automation for web-based applications.  Can be recorded and written as HTMLCan be recorded and written as HTML  Support for a number of programming languages: Java,Support for a number of programming languages: Java, C#, Perl, PHP, Python, RubyC#, Perl, PHP, Python, Ruby  Cross browsers support: IE, Firefox, Opera, Safari andCross browsers support: IE, Firefox, Opera, Safari and Google ChromeGoogle Chrome  Cross platform support: Windows, Linux, and Macintosh.Cross platform support: Windows, Linux, and Macintosh. 66www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 7.  Invented in 2004 by Jason R. Huggins and team.Invented in 2004 by Jason R. Huggins and team.  Originally named JavaScript Functional Tester [JSFT]Originally named JavaScript Functional Tester [JSFT]  100% Javascript and HTML100% Javascript and HTML  Designed to make test writing easyDesigned to make test writing easy  Open source browser based integration test frameworkOpen source browser based integration test framework built originally by ThoughtWorksbuilt originally by ThoughtWorks  Selenium is open source software, released under theSelenium is open source software, released under the Apache 2.0 license and can be downloaded and usedApache 2.0 license and can be downloaded and used without charge.without charge. Selenium BackgroundSelenium Background www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 8. Selenium TriviaSelenium Trivia 88 Selenium is a chemical element with the atomic number 34, represented by the chemical symbol Se. Selenium is used for treating Mercury poisoning Products: QTP, WinRunner, LoadRunner and TestDirector Selenium Mercury www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 9. Selenium ComponentsSelenium Components  Selenium IDESelenium IDE  Selenium RCSelenium RC  Selenium GridSelenium Grid  Selenium2 akaSelenium2 aka WebdriverWebdriver 99 < < Selenium Core< < Selenium Core www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 10. Selenium IDESelenium IDE  Selenium IDE (SIDE) is a complete IntegratedSelenium IDE (SIDE) is a complete Integrated Development Environment (IDE) for building SeleniumDevelopment Environment (IDE) for building Selenium test case.test case.  Firefox add-on that makes it easy to record, edit, andFirefox add-on that makes it easy to record, edit, and debug tests.debug tests.  Provides an easy-to-use interface for developing andProvides an easy-to-use interface for developing and running individual test cases or entire test suites.running individual test cases or entire test suites.  Can be used to generate code to run the tests withCan be used to generate code to run the tests with Selenium Remote Control (RC).Selenium Remote Control (RC). 1010www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 11. Selenium IDE FeaturesSelenium IDE Features  Record, playback, edit  Intelligent component identification will use object IDs, names, or XPath as needed  Auto complete for all common Selenium commands  Walk through test cases and test suites.  Debug and set breakpoints  Save tests as HTML, or export as other supported programming languages  Support for Selenium user extensions 1111www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 12. 1212 Installing Selenium IDEInstalling Selenium IDE www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 13. Installing Selenium IDEInstalling Selenium IDE 1313 Two step process:  Step 1. Check if Firefox is installed 1a. If Firefox is not installed on your machine then Install Firefox (There is NO IE Version of Selenium)(There is NO IE Version of Selenium)  Step 2. Check if Selenium IDE is installed) 2a. If Selenium IDE is not installed on your machine then Install Selenium IDE Plug In www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 14. Step 1: Is Firefox Installed?Step 1: Is Firefox Installed?  Check whether your machine already has a version ofCheck whether your machine already has a version of Firefox installed.Firefox installed.  Go to StartGo to Start  ProgramsPrograms  Mozilla FirefoxMozilla Firefox 1414www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 15. Step 1: Check Firefox VersionStep 1: Check Firefox Version  Click on the Mozilla FirefoxClick on the Mozilla Firefox  Go to HelpGo to Help  About as shown below:About as shown below:  Check the version nameCheck the version name  What is your version?What is your version? 1515 Must be Firefox version 3.x.x.xx not 4.x.x.xx www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 16. Step 1a: Firefox InstallationStep 1a: Firefox Installation  Open your IE browser (or any other browser)Open your IE browser (or any other browser)  Navigate to Firefox 3.6 download link.Navigate to Firefox 3.6 download link. http://www.oldapps.com/firefox.php?old_firefox=109?downloadhttp://www.oldapps.com/firefox.php?old_firefox=109?download WARNING!!!!!WARNING!!!!!  Mozilla website will not haveMozilla website will not have Firefox 3.6 download link.Firefox 3.6 download link. The most current browser version will be presented.The most current browser version will be presented. (FF 4.0)(FF 4.0) 1616www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 17. Step 1a: Firefox InstallationStep 1a: Firefox Installation 1717www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 18. Step 1a: Firefox InstallationStep 1a: Firefox Installation  Follow the steps and run the program (*1)Follow the steps and run the program (*1) (Saving into local machine then running is recommended)(Saving into local machine then running is recommended)  If prompted with Security warning, press “Run” button (*2If prompted with Security warning, press “Run” button (*2 & *3)& *3) 1818 *1 *2 *3 Save into your local machine. (C:Downloads) Run (double click Firefox Setup 3.x.x) from the location where you downloaded Ignore Security warning and press “Run” button www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 19. Step 1a: Firefox InstallationStep 1a: Firefox Installation  Press Next (*1)Press Next (*1)  Check the “I Accept” then Press Next (*2)Check the “I Accept” then Press Next (*2)  Select Standard, Remove check from “Use Firefox as mySelect Standard, Remove check from “Use Firefox as my default browser” (*3)default browser” (*3)  Press Install button (*4)Press Install button (*4)  Press Finish button (*5)Press Finish button (*5) 1919 *1 *2 *3 *4 *5 www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 20. Step 2: Is Selenium IDE Installed?Step 2: Is Selenium IDE Installed?  Open the Firefox browser window (*1)Open the Firefox browser window (*1)  Go to ToolsGo to Tools  Check whether Selenium IDE alreadyCheck whether Selenium IDE already exist there (*2)exist there (*2)  If you see “Selenium IDE” then you already havingIf you see “Selenium IDE” then you already having Selenium IDE plug-in installed in Firefox browser.Selenium IDE plug-in installed in Firefox browser.  If not installed then follow the instruction on the next slideIf not installed then follow the instruction on the next slide 2020 *1 *2 Check whether Selenium IDE is already installed www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 21. Step 2a: Installing Selenium IDEStep 2a: Installing Selenium IDE  Open the Firefox browser windowOpen the Firefox browser window  In the navigation tool bar type the below URL:In the navigation tool bar type the below URL: http://seleniumhq.org/download/http://seleniumhq.org/download/  Click the Download link next to Selenium IDE projectClick the Download link next to Selenium IDE project name.name. 2121 Don’t do this in IE Click Download www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 22. Step 2a: Installing Selenium IDEStep 2a: Installing Selenium IDE 2222 Or you can find Selenium IDE downloads in Previous Releases directory: 1. Previous Releases 2. Selenium IDE 3. Version 1.0.10 www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 23. Step 2a: Installing Selenium IDEStep 2a: Installing Selenium IDE  When the Software Installation Window opens selectWhen the Software Installation Window opens select “selenium-ide” (*1)“selenium-ide” (*1)  Click Install Now buttonClick Install Now button  ““Selenium IDE” add-on is installed (*2)Selenium IDE” add-on is installed (*2)  Click on “Restart Firefox” buttonClick on “Restart Firefox” button 2323 *1 *2 Restart Firefox for Selenium Plug-in to take effect www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 24. Step 2a: Installing Selenium IDEStep 2a: Installing Selenium IDE In the Firefox browser go to Tools and verify whetherIn the Firefox browser go to Tools and verify whether “Selenium IDE” is displayed.“Selenium IDE” is displayed. Congratulation! Selenium IDE installation is completed.Selenium IDE installation is completed. 2424 Selenium IDE is successfully installed www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 25. 2525 Recording and RunningRecording and Running Selenium TestsSelenium Tests www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 26. Test Case #1: LoginTest Case #1: Login Test-Case Objective: Ensure Valid User Login Expected Result:Expected Result: 1.OrangeHRM index page is loaded 2.Correct username is displayed as part of the greeting. “Welcome Admin” 2626 Steps : 1. In the login textbox type “admin”. 2. In the password textbox type “password”. 3. Click “Submit” button 4. Verify that a correct user name is displayed 5. Log out www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 27. Test Script #1: LoginTest Script #1: Login Test Script Steps:Test Script Steps: Open OrangeHRM application in FirefoxOpen OrangeHRM application in Firefox http://hrm.phttp://hrm.portnov.comortnov.com  Login using :Login using : Login Name: adminLogin Name: admin Password: passwordPassword: password  Click Login buttonClick Login button  Highlight “Welcome Admin” textHighlight “Welcome Admin” text  Right-click and select VerifyTextPresentRight-click and select VerifyTextPresent  Click logout linkClick logout link 2727www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 28. Recording An Automated TestRecording An Automated Test 1.1. Open OrangeHRM application in FirefoxOpen OrangeHRM application in Firefox http://hrm.portnov.comhttp://hrm.portnov.com (*1)(*1) 2.2. Open Selenium IDE in FirefoxOpen Selenium IDE in Firefox Go to ToolsGo to Tools  Selenium IDE (*2)Selenium IDE (*2) 2828 *2*1 The Record button is ON by default www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 29. Login TestLogin Test  Make sure Record button is ON!Make sure Record button is ON!  Go to the Browser windowGo to the Browser window  Login using (*2):Login using (*2): Login Name: adminLogin Name: admin Password: passwordPassword: password  Click Login buttonClick Login button 2929 *1 *2 The Record button is ON by default Login Name: admin Password: password Then click Login button www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 30. Login TestLogin Test  Highlight “Welcome Admin” text (*1)Highlight “Welcome Admin” text (*1)  Right-click and selectRight-click and select VerifyTextPresentVerifyTextPresent (*2)(*2)  Click logout linkClick logout link 3030 *1 *2 Highlight “Welcome demo” Select VerifyTextPresent www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 31. Stop RecordingStop Recording Go to Selenium IDEGo to Selenium IDE Click the red button to STOP recordingClick the red button to STOP recording All your actions are recorded and displayed sequentiallyAll your actions are recorded and displayed sequentially under Command Table Tabunder Command Table Tab 3131 Click here to Stop recording www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 32. What did we accomplish?What did we accomplish? Manual Test-Case Test-Case ObjectiveTest-Case Objective Ensure Valid User LoginEnsure Valid User Login StepsSteps  In the login textbox typeIn the login textbox type admin.admin.  In the password textbox typeIn the password textbox type password.password.  Click Submit buttonClick Submit button  Verify that a correct user nameVerify that a correct user name is displayedis displayed  LogoutLogout Expected ResultExpected Result 1)1) OrangeHRM index page isOrangeHRM index page is loadedloaded 2)2) Correct username is displayedCorrect username is displayed as part of the greeting.as part of the greeting. ““Welcome Admin”Welcome Admin” Automated Test-Case 3232 We created our first automated test scriptWe created our first automated test script www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 33. Running Selenium Automated TestRunning Selenium Automated Test Make sure the Firefox browser is still openMake sure the Firefox browser is still open Go to Selenium IDE and clickGo to Selenium IDE and click ““Play current test case”” buttonbutton 3333 *1 *2 Click to play the Test Case Make the test case playback in slow mode www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 34. Interpreting ColorsInterpreting Colors  If you see all the command line rows turnIf you see all the command line rows turn GreenGreen color,color, then the test has passed.then the test has passed.  Light Green means the code executed without problems.Light Green means the code executed without problems.  Dark GreenDark Green means the test result of the commandmeans the test result of the command evaluated toevaluated to truetrue..  If any part of the test failed it will be shown withIf any part of the test failed it will be shown with RedRed color.color. 3434www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 35. DebuggingDebugging Examine the result of the script.Examine the result of the script. 3535 Time is needed to validate the login information…Time is needed to validate the login information… The test mustThe test must WAITWAIT for the next web page to loadfor the next web page to load before proceeding.before proceeding. What went wrong? www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 36. Debugging TipsDebugging Tips  Open Selenium IDE through Tools menu,Open Selenium IDE through Tools menu, otherwise the IDE may freeze and actotherwise the IDE may freeze and act unpredictably.unpredictably.  Make sure you substitute click command withMake sure you substitute click command with clickAndWait command wherever needed.clickAndWait command wherever needed. 3636www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 37. EditingEditing EditingEditing to add wait timeto add wait time to the scriptto the script 1.1. Click the 3rd to last row whereClick the 3rd to last row where ClickAClickA command iscommand is locatedlocated 2.2. Modify the command fieldModify the command field  Replace “click” withReplace “click” with “clickAndWait”“clickAndWait” commandcommand 3.3. Re-play the test…Re-play the test… 3737 Click this row Select clickAndWait command www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info
  • 38. Helpful Notes:Helpful Notes:  One Firefox browser window must be open.One Firefox browser window must be open.  Multiple browser windows will confuse Selenium.Multiple browser windows will confuse Selenium.  Play back every automated test to ensure expectedPlay back every automated test to ensure expected behavior.behavior.  Keep playback inKeep playback in slowslow mode when debugging.mode when debugging.  Placing Browser window and Selenium IDE windowsPlacing Browser window and Selenium IDE windows side by side is a convenient way of tracking testside by side is a convenient way of tracking test execution step by step.execution step by step. 3838www.Seleniumonlinetraining.infowww.Seleniumonlinetraining.info