• Like
  • Save
Selenium
Upcoming SlideShare
Loading in...5
×
 

Selenium

on

  • 11,898 views

This is my first attempt to publish slide which I created, will be glad to know everybody's comments/responces

This is my first attempt to publish slide which I created, will be glad to know everybody's comments/responces

Statistics

Views

Total Views
11,898
Views on SlideShare
11,326
Embed Views
572

Actions

Likes
6
Downloads
524
Comments
2

19 Embeds 572

http://ruturajd.blogspot.com 208
http://ruturajd.blogspot.in 170
http://www.askqtp.com 73
http://www.slideshare.net 47
http://askqtp.blogspot.com 20
http://reddyphp.wordpress.com 19
http://ruturajd.blogspot.co.uk 13
http://ruturajd.blogspot.sg 4
http://ruturajd.blogspot.ro 3
http://ruturajd.blogspot.ca 3
http://ruturajd.blogspot.com.au 3
http://ruturajd.blogspot.de 2
http://www.ruturajd.blogspot.in 1
http://ruturajd.blogspot.sk 1
http://ruturajd.blogspot.co.il 1
http://ruturajd.blogspot.ie 1
http://621263896855444511_f3c3d91dd1b08526af78266dcf88a44b82fb7f96.blogspot.in 1
http://ruturajd.blogspot.se 1
http://ruturajd.blogspot.nl 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Veda Myself and Vivek are here to talk about “Agile Unit Testing with Mock Objects” and share our practical experiences on Mock Objects with you guys.

Selenium Selenium Presentation Transcript

  • Selenium Introduction
    • Ruturaj Doshi
      • Quality Analyst, ThoughtWorks
  • AGENDA
    • Introduction to Selenium
      • Selenium and its Forms
      • Selenium Core
      • Selenium RC
      • Deployment
      • Object locators
      • Features
      • Add On's
        • Selenium IDE
        • Locator tools.
    • Demo
    • Q & A
  • SELENIUM AND ITS FORMS
    • Selenium Core
    • Selenium RC
    • Selenium IDE
    • Selenium GRID
  • SELENIUM CORE
    • A Functional testing tool for web applications
    • Tests run directly in the browser
    • Selenium is implemented entirely with browser technology
      • JavaScript
      • DHTML
      • Frames
    • Works by looking at the DOM
    • Selenium deploys its BrowserBot alongside your application
    • Selenium uses JavaScript and IFrames to embed the BrowserBot in your browser
    • Works with virtually any JavaScript-enabled browser
    • The engine is tweaked to support a wide range of browsers on Windows, Mac OS X and Linux
  • SELENIUM RC
    • Where the browser is under the control of another process
    • Drivers exist for Java, .NET, Python, and Ruby
    • The Browser Bot takes instructions from the adjacent process
      • However, JavaScript cannot open sockets (Cross-site scripting issues)
      • The Selenese driver continuously requests pages from the driving
      • process, delivered as plain text
      • This is reply/request (rather than request/reply)
  • DEPLOYMENT
  • DEPLOYMENT
  • FEATURES
    • Multi Platform support
      • Windows,Linux,Mac
    • Multi browser support
      • IE, Firefox, Safari, Netscape
    • Multiple programming Language support
      • C#, Java, Ruby, Python
    • Xpath, Htmlid, DOM, Css selector
    • Support Ajax
    • ProxyInjection Mode
    • Experimental Browsers provided to test secured sites
    • Easy to use, small learning curve
    • Free-Open source
    • Matured Community
  • OBJECT LOCATOR
    • HTML-ID’s
      • Id=LoginButton
    • xpath= xpathExpression
      • Locate an element using an XPath expression. XPath locators must
      • begin with "//".
      • xpath=//img[@alt='The image alt text']
      • xpath=//table[@id='table1']//tr[4]/td[2]
    • link= textPattern
      • Select the link (anchor) element which contains text matching the specified pattern.
      • link=The link text
    • css=cssSelectorSyntax
      • Select the element using css selectors.
      • css=a[href="#id3"]
      • css=span#firstChild + span
  • ADD ON'S : LOCATOR TOOLS
    • XPather
    • https://addons.mozilla.org/extensions/moreinfo.php?id=1192
    • XPath Checker
    • https://addons.mozilla.org/extensions/moreinfo.php?id=1095
    • FireBug
    • https://addons.mozilla.org/en-US/firefox/addon/1843
  • ADD ON'S : SELENIUM IDE
    • FireFox extension
    • Not just a recorder
    • Easy record and playback
    • Intelligent field selection will use
    • IDs, names, or XPath as needed
    • Auto complete for all common
    • Selenium commands
    • Walk through tests
    • Debug and set breakpoints
    • Save tests as HTML, Ruby scripts,
    • or any other format
    • Support for Selenium
    • Userextensions.js file
    • Option to automatically assert the
    • title of every page
  • HOW TO START SELENIUM RC SERVER
    • Dependencies : Java must be installed on your machine and java home is configured in PATH.
    • Command to be typed on command prompt.
    • Java –jar Selenium-server.jar
    • By Default Selenium server runs on port 4444.
    • We can make Selenium port use configurable. Start Selenium server with above command
    • Java –jar Selenium-server.jar –port 9000
    • When we do this we also need to modify port while instanstbase class where we modify port.
    • E.g. Iselenium selenium = new DefaultSelenium(“localhost”,9000,”*firefox”,”http://www.google.com”)
  • SAVING TEST RESULTS IN SELENIUM
    • Selenium RC allow you to dump all script execution log in one file.
    • Java –jar Selenium-server.jar –log debug.txt
    • Log shown in file look like this
    • TIMESTAMP LEVEL [THREAD] LOGGER-MESSAGE
    • The Java implementation of the Selenium Server logs plenty of logging messages, but the JavaScript on the browser side (Selenium Core) also logs important messages; in many cases, these can be more useful to the end-user than the regular Selenium Server log
  • Q & A
  • Selenium download @ http://www.openqa.com/Selenium http://openqa.org/selenium-rc/ Email: [email_address]