Selenium Introduction <ul><li>Ruturaj Doshi </li></ul><ul><ul><li>Quality Analyst, ThoughtWorks </li></ul></ul>
AGENDA <ul><li>Introduction to Selenium  </li></ul><ul><ul><li>Selenium and its Forms </li></ul></ul><ul><ul><li>Selenium ...
SELENIUM AND  ITS FORMS  <ul><li>Selenium Core </li></ul><ul><li>Selenium RC </li></ul><ul><li>Selenium IDE </li></ul><ul>...
SELENIUM CORE <ul><li>A Functional testing tool for web applications </li></ul><ul><li>Tests run directly in the browser <...
SELENIUM RC <ul><li>Where the browser is under the control of another process </li></ul><ul><li>Drivers exist for Java, .N...
DEPLOYMENT
DEPLOYMENT
FEATURES <ul><li>Multi Platform support </li></ul><ul><ul><li>Windows,Linux,Mac </li></ul></ul><ul><li>Multi browser suppo...
OBJECT LOCATOR <ul><li>HTML-ID’s </li></ul><ul><ul><li>Id=LoginButton </li></ul></ul><ul><li>xpath= xpathExpression </li><...
ADD ON'S :  LOCATOR TOOLS <ul><li>XPather </li></ul><ul><li>https://addons.mozilla.org/extensions/moreinfo.php?id=1192 </l...
ADD ON'S :  SELENIUM IDE <ul><li>FireFox extension </li></ul><ul><li>Not just a recorder </li></ul><ul><li>Easy record and...
HOW TO START SELENIUM RC SERVER <ul><li>Dependencies : Java must be installed on your machine and java home is configured ...
SAVING TEST RESULTS IN SELENIUM <ul><li>Selenium RC allow you to dump all script execution log in one file. </li></ul><ul>...
Q & A
Selenium download @ http://www.openqa.com/Selenium http://openqa.org/selenium-rc/   Email: [email_address]
Upcoming SlideShare
Loading in...5
×

Selenium

9,354

Published on

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

Published in: Technology
2 Comments
6 Likes
Statistics
Notes
No Downloads
Views
Total Views
9,354
On Slideshare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
537
Comments
2
Likes
6
Embeds 0
No embeds

No notes for slide
  • 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

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

      Clipping is a handy way to collect important slides you want to go back to later.

    ×