Selenium presentation


Published on

Web Automation using Selenium: Pros and Cons with Comparison with similar tools available in market

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Selenium presentation

  1. 1. Selenium for web automation Madhu Kumari B.E Computer Engg.
  2. 2. Selenium Webdriver ● ● ● ● WebDriver is a tool for automating testing web applications It aims to provide a friendly API that’s easy to explore, understand and maintain It’s not tied to any particular test framework, so it can be used equally well in a unit testing or from a plain old “main” method Once your project is set up, you can see that WebDriver acts just as any normal library: it is entirely self-contained
  3. 3. Selenium IDE ● ● ● ● ● It is the only flavor of selenium that allows us to record user actions on browser window Scripts recorded in IDE can be converted into other languages like Java, C#, Python and Ruby It is not only a time saver but also an excellent way of learning scripts syntax Allows to insert comments in the middle of the script for better understanding and debugging Supports context menu
  4. 4. Selenium Webdriver: Portability ● ● ● ● All Java projects work the same with a src & bin folders and other related folders Each IDE creates it's own IDE project/workspace files as well One can use same source files within it's hierarchy of folders easily among different Java IDEs Just ensure to use standardized IDE for better portability experience
  5. 5. Need of Eclipse for Automation using Selenium Webdriver ● ● ● Depends upon the requirements Eclipse has been one of the best IDEs for unit testing ever since it's early days But other alternatives to Eclipse for Automation using Selenium Webdriver are also available
  6. 6. Is there any IDE available for web automation using Selenium? ● IntelliJ IDEA – Have the best IntelliSense – It's also an open source – For the Ultimate license you have to pay
  7. 7. Demerits of Selenium IDE ● It runs only in firefox browser ● Selenium IDE can execute scripts created in selenese only ● Cannot upload files ● It does not directly support loops and conditions ● Reading from external files like .txt, .xls is not possible
  8. 8. Selenium IDE vs Selenium Webdriver SR. NO. CRITERIA SELENIUM IDE SELENIUM WEBDRIVER 1 Browser compatibility Only Mozilla Firefox Latest versions of all browsers – Firefox, IE, Opera, Chrome 2 Record and play/run tool Available Not Available 3 Server Not required Core engine is Javascript based, interacts natively with browser application 4 Simple to use Yes Complex and a bit large API as compared to RC 5 Object oriented No Purely 6 Mouse cursor Cannot move mouse Can move mouse cursor 7 Listener No Listener Implementation is available 8 Test iPhone/Android application Cannot test Can test
  9. 9. Selenium vs Low/Network level tools ● ● ● "Low/network" level tool like Htmlunit has the advantage of being fast - but its javascript will not work work in most complex websites(besides not being a browser test) Selenium(java, .net) code also has the disadvantage of being dependent on RC server(not big deal) You should continue low level tools like Httpunit for monitoring - but it's not preferable to use these tools for browser/regression testing.
  10. 10. Selenium vs Watir ● ● ● ● For people favouring test cases in Ruby ( then Watir is a tool Watir does have advantage that its recorder uses IE to record. With Selenium IDE – Only browser support is there for Firefox – else you will have to manually write the code The biggest advantage of Selenium is its support for FIT HTML and the vast languages/browsers/platform that it supports.(with good documentation)
  11. 11. Selenium vs IMacros ● ● ● IMacros appears better in recording as compared to Selenium IDE As per automation Imacros is not powerful for automation as Selenium IDE For scheduling as well Selenium is better compared to IMacros
  12. 12. Selenium vs Dejaclick ● ● ● Dejaclick is probably the best (free) macro tool for websites record and play. Selenium beats DejaClick in overall features(multiple language suport vs only XML support, free automation vs paid automation). Advantages of Dejaclick: – It nicely plays back the recorded stuff - by highlighting appropriate items in green. – It can easily record flash/silverlight - by recording position.(however it may mean that it may not nicely work in all computers) – Allows to encrypt sensitive data – Allows to bookmark the script for playback.
  13. 13. Demerits of Dejaclick ● Disadvantage: – ● Dejaclick recording tool is free - But for automation you have to rely on paid site alertsite AlertSite – Provides great facility for running your dejaclick script and even soap xml from most of cities/region in US/world – Also allows you to monitor the CDN performance/reliability or what content your website is serving across different regions
  14. 14. Selenium vs Sahi ● Pros: – – Has its own IDE – Record and playback tests – Data-driven test via jdbc:odbc bridge – Test success/failure reporting in html files – Capabilities to run test using batch file or ant script – ● Multi-browser support Lightweight Cons: – documentation needs to be enhanced – need to be improved reporting